SamSumiya / snake-js

Home Page:https://samsumiya.github.io/snake-js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

snake-js

Features

  1. Snake grows as it eats the food
  2. Food appears randomly on the screen after being eaten
  3. Game over if snake hits the game border or itself

Learned

  1. use requestAnimationFrame to call the function continuously in async fashion
  2. use grid to position and create snake and food
  3. break logics down to smaller functions to build the game

About

https://samsumiya.github.io/snake-js/


Languages

Language:JavaScript 86.3%Language:CSS 8.5%Language:HTML 5.2%