Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = 450
- y = 450
- radius = 90
- class snake:
- def __init__(self):
- global x, y
- self.dickbags_number = 1
- if current_direction == 'left': self.sortament_of_dickbags = [[x+radius], [y]]
- if current_direction == 'right': self.sortament_of_dickbags = [[x-radius], [y]]
- if current_direction == 'up': self.sortament_of_dickbags = [[x], [y-radius]]
- if current_direction == 'up': self.sortament_of_dickbags = [[x], [y+radius]]
- def add(self):
- global s, x, y
- self.dickbags_number += 1
- self.sortament_of_dickbags.append([x - radius
- * self.dickbags_number])
- self.sortament_of_dickbags.append([y - radius
- * self.dickbags_number])
- def current_tail(self):
- return self.sortament_of_dickbags
- a = snake()
- a.add()
- a.add()
- a.add()
- a.add()
- a.add()
- print a.current_tail()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement