lkpideas.blogg.se

In screen snake game
In screen snake game







Game_window.blit(score_surface, score_rect) Score_rect.midtop = (frame_size_x / 2, frame_size_y / 1.25)

in screen snake game

Score_rect.midtop = (frame_size_x - 100, 15) Score_surface = score_font.render('Score : ' + str(score), True, color) Game_window.blit(game_over_surface, game_over_rect)ĭef show_score(choice, color, font, size): Game_over_rect.midtop = (frame_size_x / 2, frame_size_y / 4) Game_over_rect = game_over_surface.get_rect() Game_over_surface = my_font.render('YOU DIED', True, red) Game_window = _mode((frame_size_x, frame_size_y))

in screen snake game

Print(f' Had errors when initialising game, exiting.') # second number in tuple gives number of errors

in screen snake game

The problem isn't how to make the game restart when you press space but to actually make it restart. In the game that I have found on github there is a game over screen that shows your score, now I want to make the game restart if you press space so that you don't need to close the program and open it again to play it again.









In screen snake game