-
draw window
-
update the game logic
-
handle input
-
use the data to draw graphics
-
clear the screen
-
update the game
-
draw th game
- Behavior
- Constants
- Data Definitions
- 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"}: snake[0].x]