Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from collections import deque
- moving_direction = deque()
- class Controller:
- def __init__(self):
- pass
- def move_forward(self, repeat):
- for time in range(repeat):
- moving_direction.appendleft('forward')
- def move_right(self, repeat):
- for time in range(repeat):
- moving_direction.appendleft('right')
- def move_back(self, repeat):
- for time in range(repeat):
- moving_direction.appendleft('back')
- def move_left(self, repeat):
- for time in range(repeat):
- moving_direction.appendleft('left')
Add Comment
Please, Sign In to add comment