- Start a local server to serve
index.html. If you are using Python 3 you can runpython -m http.server. - Open your browser and navigate to
localhost:8000. - Play!
- Handle the following edge cases:
- The provided canvas and scale combination can only fit one cell.
- The scale doesn't divide evenly into dimensions.
- Use images to represent the snake and the apple.
- Show a counter that keeps track of the snake length.
- Optimize the function for getting a random available coordinate.
- Add the ability to pause.
- Animate the snake movement more smoothly.
- Paint the boundaries of the game area.