Skip to content

Commit

Permalink
fix stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
james-gray committed Feb 21, 2015
1 parent cfa7e0a commit d016fdb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,19 +92,19 @@ def get_possible_directions(nagini, board):

for direction in look_ahead1:
if direction == UP:
look_aheadUP = look_ahead(head_x, head_y+1, board)
look_aheadUP = look_ahead(head_x, head_y-1, board)
if len(look_aheadUP) > 0:
directions.append(UP)
elif direction == DOWN:
look_aheadDOWN = look_ahead(head_x, head_y-1, board)
look_aheadDOWN = look_ahead(head_x, head_y+1, board)
if len(look_aheadDOWN) > 0:
directions.append(DOWN)
elif direction == LEFT:
look_aheadLEFT = look_ahead(head_x-1, head_y, board)
if len(look_aheadLEFT) > 0:
directions.append(LEFT)
elif direction == RIGHT:
look_aheadRIGHT = look_ahead(head_x+1, head_y+1, board)
look_aheadRIGHT = look_ahead(head_x+1, head_y, board)
if len(look_aheadRIGHT) > 0:
directions.append(RIGHT)

Expand Down

0 comments on commit d016fdb

Please sign in to comment.