Advertisement
Sinux

power of thor game loop(broken)

Aug 2nd, 2015
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. # game loop
  2. while 1:
  3. remainingTurns = int(raw_input())
  4. # Write an action using print
  5. #To debug: print >>
  6.  
  7. thorX, thorY = initialTX , initialTY
  8.  
  9. if thorX > lightX:
  10. directionX = 'W'
  11. thorX-= 1
  12. elif thorX < lightX:
  13. directionX = 'E'
  14. else:
  15. directionX = ''
  16.  
  17.  
  18. if thorY > lightY:
  19. directionY = 'N'
  20. thorY -= 1
  21. elif thorY < lightY:
  22. directionY = 'S'
  23. thorY += 1
  24. else:
  25. directionY = ''
  26.  
  27. print directionY + directionX
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement