Advertisement
Guest User

4.8

a guest
Feb 29th, 2020
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1.  
  2. while not reached_goal():
  3.     if has_path_left():
  4.         turn_left()
  5.         if enemy_in_sight():
  6.             fire()  
  7.             turn_right()            
  8.     elif has_path_right():
  9.         turn_right()
  10.         if enemy_in_sight():
  11.             fire()
  12.             turn_left()          
  13.     if has_path_ahead():
  14.         forward()
  15.     else:
  16.         jump()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement