refactor: rename start-chess.py and fix typos

This commit is contained in:
Nemo D'ACREMONT 2025-05-07 21:56:05 +02:00
parent 9d28f31900
commit 7ce57543dc
No known key found for this signature in database
GPG Key ID: 85F245EC3BB1E022
2 changed files with 6 additions and 6 deletions

View File

@ -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