This project is available at: http://snake-game-sidgi.surge.sh
- DOM elements
- Canvas
- Reading keyboard keys
- Media queries through js
- Touch events
My Snake Game has 3 levels:
- Level 1
- Snake wins when it gets 10pts;
- After collision with square it absorbs that square and becomes bigger on the size of that square and gets 1pts for each square;
- It looses after it hits itself;
- Level 2
- Snake wins when it gets 10pts;
- After collision with square it absorbs that square and becomes bigger on the size of that square and gets 1pts for each square;
- It looses after it hits itself;
- Speed faster
- Level 3
- Snake wins when it gets 10pts;
- After collision with square it absorbs that square and becomes bigger on the size of that square and gets 1pts for each
square; - It looses after it hits itself or hits the border;
- Speed faster
- Link to website
- Press start
- Press the arrow keys to move snake
- Eat red squares to win
- Don't hit yourself and in a third level don't hit border as well
- If you win press next level
- If you lose press restart game, it will restart from the same level
- Press space to pause/resume the game
- Link to website
- Change view to landscape and then back to portrtait - and it will change layout for mobile
- Move snake with scrolling your finger on the phone (response to touch movements)
- Scroll top - Snake moves up
- Scroll down - Snake moves down
- Scroll right - Snake moves right
- Scroll left - Snake moves left
- The rules are the same as in desktop
- You can't pause the game
- Learning canvas;
- Link the keyboard keys to actual movement of the snake;
- Make it mobile competable;
- Make it respond to touch movements
- Make my snake game using OOP (using classes and objects)
- Collision detection;
- https://www.youtube.com/watch?v=9TcU2C1AACw
- https://www.youtube.com/watch?v=xGmXxpIj6vs
- MDN
- Google I am planning to foresee the problem with reading books, use resources such as eloiqueant js, Youtube and Google, and MDN.




