Skip to content

N1ghtF1re/snake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snake

About game

Simple snake realization on js

Connecting the Game

  • Connect the style from the style/snake.css folder.
  • Connect the js-script from the js/snake.js folder.
  • Place on the page a div-block with id = field
  • Initialize the game field
gameField = new Field(field) 
onkeydown = function (e) {gameField.onKeyDown(e)}