annotated the legal moves function better
This commit is contained in:
parent
c900ebcfa0
commit
362b0e157d
@ -1,3 +1,4 @@
|
|||||||
|
from logic.board import Board
|
||||||
from logic.position import Position
|
from logic.position import Position
|
||||||
from logic.move import Move
|
from logic.move import Move
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
@ -17,5 +18,5 @@ class Piece:
|
|||||||
def position(self) -> Position:
|
def position(self) -> Position:
|
||||||
return self.pos
|
return self.pos
|
||||||
|
|
||||||
def legal_moves(self, board) -> list[Move]:
|
def legal_moves(self, board: Board) -> list[Move]:
|
||||||
raise NotImplementedError(f"Can't say what the legal moves are for {type(self).__name__}, the method hasn't been implemented yet")
|
raise NotImplementedError(f"Can't say what the legal moves are for {type(self).__name__}, the method hasn't been implemented yet")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user