Skip to content

KudzanaiGomera/Snake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Building a snake game using pygame framework

Step

  • draw window

  • update the game logic

  • handle input

  • use the data to draw graphics

  • clear the screen

  • update the game

  • draw th game

  1. Behavior
  2. Constants
  3. Data Definitions
  4. functions

""" Behavior: Game Over: - snake hits the edge of the screen - snake touches itself Sanke Movement: - body trails its head Snake: - Eats an apple, grows by one Score: - How much food has been eaten Menu Screen: - Shows one time at the beginning - disappears on any key press Game over: - Display when snake hits wall or eats itself - will go back a new game on any keypress Key input: - arrow keys and wasd change snake direction """

""" Constants: - Colors - Window dimensions - size of cells - frame rate - Cell width and cell height """

""" Data Definitions: - """

[{"x": 1, "y": 2},

{"x"}: snake[0].x]

About

snake game using pygame framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages