GunTHE

Untitled

Jul 18th, 2020
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.60 KB | None | 0 0
  1. from collections import deque
  2.  
  3. moving_direction = deque()
  4.  
  5.  
  6. class Controller:
  7.     def __init__(self):
  8.         pass
  9.  
  10.     def move_forward(self, repeat):
  11.         for time in range(repeat):
  12.             moving_direction.appendleft('forward')
  13.  
  14.     def move_right(self, repeat):
  15.         for time in range(repeat):
  16.             moving_direction.appendleft('right')
  17.  
  18.     def move_back(self, repeat):
  19.         for time in range(repeat):
  20.             moving_direction.appendleft('back')
  21.  
  22.     def move_left(self, repeat):
  23.         for time in range(repeat):
  24.             moving_direction.appendleft('left')
Add Comment
Please, Sign In to add comment