Skip to content

Commit

Permalink
fix: Handle empty initial move
Browse files Browse the repository at this point in the history
  • Loading branch information
TheJiahao committed Apr 23, 2024
1 parent 1b2eead commit befc7b6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/connect_four_lib/connect_four_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ def __init__(self, elo) -> None:
self.engine: ConnectFourEngine = ConnectFourEngine()
self.elo: int = elo

def play(self, move) -> str:
self.engine.add_move(move)
def play(self, move: str) -> str:
if move:
self.engine.add_move(move)

new_move = self.engine.get_best_move()

Expand Down

0 comments on commit befc7b6

Please sign in to comment.