Skip to content
Snippets Groups Projects
Forked from asghar / se3xa3
169 commits ahead of the upstream repository.
andyh98's avatar
Hameed Andy authored
0494fc82
History
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Name Last commit Last update
..
css
js
LICENSE
README.md
index.html

JavaScript Snake
By Patrick Gillespie
License: MIT
http://patorjk.com/games/snake

This is a DOM-based game of Snake that I wrote in JavaScript a few years back.

Other than the full screen mode demonstrated in the code, it can also be initialized in div tags within a page. Example:

var mySnakeBoard = new SNAKE.Board( {
                                        boardContainer: "game-area",
                                        fullScreen: false,
                                        width: 580,
                                        height:400
                                    });

The comments are formatted a little strange because at the time I was playing around with YUI Doc.