예제 #1
0
    def new_game(self,over_flag):

        if over_flag:
             
            self.snake = SNAKE()
            self.score = 0
            self.G = 0
            self.special_food.g = True
            self.special_food.fl = True
예제 #2
0
 def __init__(self):
     self.G = 0
     self.food = FOOD(CHERRY)
     self.snake = SNAKE()
     self.special_food = S_FOOD()
     self.screen = pygame.display.set_mode((SCREEN_SIZE),0,32)
     self.clock = pygame.time.Clock()
     self.linebar = Linebar(WHITE,(30,25),RECT)
     self.timer = 0
     self.button = False
     self.played = False