Coord was inverted (is <y><x>)

This commit is contained in:
Yorick Barbanneau 2023-12-22 22:38:37 +01:00
parent e39a1380f4
commit da7f83735b
2 changed files with 3 additions and 3 deletions

View file

@ -71,7 +71,7 @@ class PlayerEngine:
def _show_better_move(self, move, heuristic): def _show_better_move(self, move, heuristic):
self.logger.debug(" -> Found a better move: {},{} | heuristic:{}".format( self.logger.debug(" -> Found a better move: {},{} | heuristic:{}".format(
chr(move[1] + 65), move[2], move[1], chr(move[2] + 65),
heuristic heuristic
)) ))
@ -136,7 +136,7 @@ class HumanPlayerEngine(PlayerEngine):
if input == 'help': if input == 'help':
text = "Possible move:" text = "Possible move:"
for m in board.legal_moves(): for m in board.legal_moves():
text += " {}{}".format(chr(65+m[1]), m[2]) text += " {}{}".format(m[1], chr(65+m[2]))
print(text) print(text)
return None return None

View file

@ -215,7 +215,7 @@ if __name__ == '__main__':
print("Player {} move: {},{}".format( print("Player {} move: {},{}".format(
"Black (X)" if move[0] == 2 else "White (O)", "Black (X)" if move[0] == 2 else "White (O)",
move[1], move[1],
move[2] chr(65+move[2])
)) ))
game.push(move) game.push(move)