A game made in html using Canvas. This code was initially based on another code, I would like to thank Steven Lambert therefore.
This version has the following improvements:
- The snake doesn't die when colliding with itself
- Now snake adjusts itself to grid, block and canvas size. It spawns on the other side regardless of canvas or block size
- There is another apple that spawns, if the snake eats it, it shrinks in size
- Mobile controls
- The snake is colored(the head has a unique color)
- The snake spawns at a random location and in a random direction
- Point count
- Better organization of codes and variables
note: translator's english