Skip to content

Commit

Permalink
manual game works with obl pytorch
Browse files Browse the repository at this point in the history
  • Loading branch information
ravihammond committed Mar 5, 2024
1 parent 46153d9 commit 768b9b2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jaxmarl/environments/hanabi/manual_game.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ def act(self, env, obs, legal_moves, curr_player) -> int:
try:
print("---")
action = int(input('Insert manual action: '))
print("action legal:", legal_moves[curr_player][action])
print("---\n")
if action >= 0 and action <= 20 and legal_moves[action] == 1:
if action >= 0 and action <= 20 and legal_moves[curr_player][action] == 1:
break
else:
print('Invalid action.')
Expand Down

0 comments on commit 768b9b2

Please sign in to comment.