Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
shatterblade committed Oct 9, 2018
1 parent 1a4ba4a commit 91e6605
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
28 changes: 14 additions & 14 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ def act(self, state, tau):
state.print()
time.sleep(2)
action = -1
allowedActions = state.allowedActions
while 1:
try:
action = int(input('Enter your move: '))
if state.allowedActions.__contains__(action):
if allowedActions.__contains__(action):
break
else:
print('Enter a valid move.')
Expand Down

0 comments on commit 91e6605

Please sign in to comment.