Skip to content

mecaneer23/python-snake-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Snake Game

Snake game in action!

This is a snake game in python. The default characters are as below.

  • Snake: #
  • Food: *
  • Background: .

GitHub

How to play

wasd or arrow keys or Vim hjkl for snake movement. q to quit. Any other key to pause. Press one of the movement keys to resume.

Running the game

python3 snake.py [flags]

Flags

See snake.py --help

Example configurations

python3 snake.py --char-head='' --char-snake='+' --char-bg=' '
python3 snake.py --color-snake blue --color-food red

Todo

  • Make horizontal and vertical speeds equal (see commit history for details)
  • Add support for best score saving/loading (tentative)