Skip to content

Instantly share code, notes, and snippets.

View NguyenHai2310's full-sized avatar

Nguyen Khac Hai NguyenHai2310

View GitHub Profile
@NguyenHai2310
NguyenHai2310 / main.py
Created July 28, 2016 02:27
snake game
import curses
from curses import KEY_RIGHT, KEY_LEFT, KEY_DOWN, KEY_UP
from random import randint
WIDTH = 120
HEIGHT = 30
MAX_X = WIDTH - 2
MAX_Y = HEIGHT - 2
SNAKE_LENGTH = 5