Skip to content

Commit

Permalink
Fixed issue with out of bounds randint
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonah Pierce committed Nov 9, 2020
1 parent d6174f3 commit f029fbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cogs/game/minigames/chess/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ async def process_turn(self, game):

# Generate a random number of best moves
best_move = choice(legal_moves)
for move_try in range(randint(1, len(legal_moves) - 1)):
for move_try in range(randint(1, len(legal_moves))):
best_move = choice(legal_moves)
game.board.push_uci(best_move)

Expand Down

0 comments on commit f029fbc

Please sign in to comment.