Skip to content

Commit

Permalink
Fix: ALE_HAC.py had indentation issues. This closes #114.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Hutton committed Jun 28, 2016
1 parent 981ae24 commit 40f1796
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions Malmo/samples/Python_examples/ALE_HAC.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def keyUp(event):
if event.keysym == 'Escape':
root.destroy()
if event.keysym == 'Right':
right = 0
right = 0
if event.keysym == 'Left':
left = 0
if event.keysym == 'Up':
Expand All @@ -68,17 +68,17 @@ def keyUp(event):
def keyDown(event):
global left, right, up, down, fire
if event.keysym == 'Right':
right = 1
left = 0 # left and right are mutually exclusive
right = 1
left = 0 # left and right are mutually exclusive
if event.keysym == 'Left':
left = 1
right = 0
right = 0
if event.keysym == 'Up':
up = 1
down = 0 # up and down are mutally exclusive
down = 0 # up and down are mutally exclusive
if event.keysym == 'Down':
down = 1
up = 0
up = 0
if event.keysym == 'space':
fire = 1

Expand Down Expand Up @@ -162,22 +162,22 @@ def sendCommand():
ops = ops - set(leftops)

if right:
ops = ops & set(rightops)
ops = ops & set(rightops)
else:
ops = ops - set(rightops)

if up:
ops = ops & set(upops)
ops = ops & set(upops)
else:
ops = ops - set(upops)

if down:
ops = ops & set(downops)
ops = ops & set(downops)
else:
ops = ops - set(downops)

if fire:
ops = ops & set(fireops)
ops = ops & set(fireops)
else:
ops = ops - set(fireops)

Expand Down

0 comments on commit 40f1796

Please sign in to comment.