refactor: rename start-chess.py and fix typos
This commit is contained in:
parent
9d28f31900
commit
7ce57543dc
@ -11,12 +11,12 @@ class PlayerInterface:
|
|||||||
|
|
||||||
# Returns your player name , as to be displayed during the game
|
# Returns your player name , as to be displayed during the game
|
||||||
def getPlayerName(self) -> str:
|
def getPlayerName(self) -> str:
|
||||||
return " Not Defined "
|
return "Not Defined"
|
||||||
|
|
||||||
# Returns your move. The move must be a valid string of coordinates ("A1",
|
# Returns your move. The move must be a valid string of coordinates ("A1",
|
||||||
# "D5", ...) on the grid or the special "PASS" move. A couple of two integers ,
|
# "D5", ...) on the grid or the special "PASS" move. A couple of two integers,
|
||||||
# which are the coordinates of where you want to put your piece on the board .
|
# which are the coordinates of where you want to put your piece on the board.
|
||||||
# Coordinates are the coordinates given by the Goban . py method legal_moves ().
|
# Coordinates are the coordinates given by the Goban. py method legal_moves ().
|
||||||
def getPlayerMove(self) -> chess.Move:
|
def getPlayerMove(self) -> chess.Move:
|
||||||
return chess.Move.null()
|
return chess.Move.null()
|
||||||
|
|
||||||
@ -25,8 +25,8 @@ class PlayerInterface:
|
|||||||
def playOpponentMove(self, move):
|
def playOpponentMove(self, move):
|
||||||
self.board.push(move)
|
self.board.push(move)
|
||||||
|
|
||||||
# Starts a new game , and give you your color . As defined in Goban . py : color =1
|
# Starts a new game, and give you your color. As defined in Goban.py : color=1
|
||||||
# for BLACK , and color =2 for WHITE
|
# for BLACK , and color=2 for WHITE
|
||||||
def newGame(self, color):
|
def newGame(self, color):
|
||||||
self.board = chess.Board()
|
self.board = chess.Board()
|
||||||
self.color = color
|
self.color = color
|
||||||
|
Loading…
x
Reference in New Issue
Block a user