Skip to content

Instantly share code, notes, and snippets.

View HabebusRizmius's full-sized avatar

HabebusRizmius

View GitHub Profile
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

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
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