adaptation by Matias Beckerle
Licensed under The MIT License (http://www.opensource.org/licenses/mit-license.php)
- Include the javascript and stylesheet files. For example:
<link rel="stylesheet" href="css/main.css" type="text/css" />
<script src="js/snake.js"></script>
- Create an html tag, like body, and identify it.
<body id="body"></body>
- Create the game object between script tags.
<script type="text/javascript">
var snake = new SnakeGame('body');
</script>
To all who wrote tutorials about HTML5 canvas.
- The snake start in the middle.
- Countdown added and some refactoring.
- Added new method "restart" in Screen object.
- Styling.
- First version.