Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pygame
- import copy
- class Segment(pygame.sprite.Sprite):
- def __init__(self):
- super(Segment, self).__init__()
- self.image = pygame.image.load("images/segment.png")
- self.position = pygame.Rect(-32, -32, 32, 32)
- self.last_position = None
- def shift(self, new_position):
- self.last_position = copy.deepcopy(self.position)
- self.position = copy.deepcopy(new_position)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement