Display game board with Board.show_board()

This commit is contained in:
Yorick Barbanneau 2023-12-15 01:43:44 +01:00
parent 7b49cac308
commit 3784faeaed
2 changed files with 14 additions and 3 deletions

View file

@ -35,14 +35,13 @@ class HumanPlayerEngine(PlayerEngine):
user_input = input("Please enter player {} move, `print` to display board and `help` possible moves : ".format(
self.get_player_name(board._nextPlayer)
))
move = self.validate_input(user_input, board, player)
print("{}".format(move))
move = self.validate_input(user_input, board)
return move
@staticmethod
def validate_input(input, board):
if input == 'print':
print("\n{}".format(board.__str__))
print(board.show_board())
return None
if input == 'help':