Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e6eb409

Browse files
authored
Update README.md
1 parent 96478b1 commit e6eb409

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

README.md

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1 @@
1-
# JavaScript Snake Game
21

3-
This is a DOM-based game of Snake that I wrote in JavaScript over a decade ago. It was made to have sort of a nostalgic feel to it.
4-
5-
## Play and Edit the Game Online!
6-
7-
You can now play and edit the game live in codesandbox:
8-
9-
https://codesandbox.io/s/github/patorjk/JavaScript-Snake?file=/index.html
10-
11-
On first load sometimes the game frame will not load correctly and you'll need to press the refresh icon above its display panel to get the game to show.
12-
13-
Original game is located here:
14-
15-
http://patorjk.com/games/snake
16-
17-
18-
## How to use
19-
The index.html file should give an idea of how to use this code. However, below you can see how to initialize it into any div within a webpage.
20-
21-
var mySnakeBoard = new SNAKE.Board( {
22-
boardContainer: "game-area",
23-
fullScreen: false,
24-
width: 580,
25-
height:400
26-
});
27-
28-
The comments within the source code are formatted a little strange because at the time I was playing around with YUI Doc which generates documentation from code. Kind of sucks that there's so much churn in the JavaScript world. However, I'm glad the rest of the code doesn't use any external libraries, as this game still works the same after over a decade.

0 commit comments

Comments
 (0)