import sys
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys, os, pygame, random, math | |
| pygame.init() | |
| pygame.display.set_caption("Snake") | |
| pygame.font.init() | |
| random.seed() | |
| SPEED=0.36 | |
| SNAKE_SIZE=9 | |
| APPLE_SIZE=SNAKE_SIZE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys, os, pygame, random, math | |
| pygame.init() | |
| pygame.display.set_caption("Snake") | |
| pygame.font.init() | |
| random.seed() | |
| SPEED=0.36 | |
| SNAKE_SIZE=9 | |
| APPLE_SIZE=SNAKE_SIZE |
Snake Game
The Controls
The controls are fairly simple:
Left => Left Key Right => Right Key Up => Up Key Down => Down Key
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys, os, pygame, random, math | |
| pygame.init() | |
| pygame.display.set_caption("Snake") | |
| pygame.font.init() | |
| random.seed() | |
| SPEED=0.36 | |
| SNAKE_SIZE=9 | |
| APPLE_SIZE=SNAKE_SIZE |