Snake game built with Pixi.js
spec:
- Snake can be controlled by arrows.
- Snake food will be placed randomly on screen.
- Snake food has a random timeout between 4 to 10 seconds
- Snake elongates itself after eating the food.
- Every food intake gives 1 point.
- If the snake hits a boundary, the size of the game area should reduce by 113px and the direction of the snake reverses.
- Game is over when snake gets in contact with itself.
- Dimensions of food should be equal to dimension of one segment of the snake.
- Dimension of food should be 16px X 16px.
- The game area should be of size 800px X 800px.
- "Play Again" button should appear once the game is over.
- In the subsequent gameplays, if the score is greater than the previous gameplay score, then change the color of the score.