diff --git a/Javascript_Snake_Original/LICENSE b/Javascript_Snake_Original/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..ebdaec1edcee94929ba462ef606f1d4ff5ac3190
--- /dev/null
+++ b/Javascript_Snake_Original/LICENSE
@@ -0,0 +1,7 @@
+Copyright © Patrick Gillespie, http://patorjk.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/Javascript_Snake_Original/README.md b/Javascript_Snake_Original/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..f2181309218b4600914b7ef8dc3bc8ac005e83c7
--- /dev/null
+++ b/Javascript_Snake_Original/README.md
@@ -0,0 +1,19 @@
+JavaScript Snake<br/>
+By Patrick Gillespie<br/>
+License: MIT<br/>
+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.
diff --git a/Javascript_Snake_Original/css/dark-snake.css b/Javascript_Snake_Original/css/dark-snake.css
new file mode 100644
index 0000000000000000000000000000000000000000..38d7d67aa686c4117129baf7b0d0367dc217e863
--- /dev/null
+++ b/Javascript_Snake_Original/css/dark-snake.css
@@ -0,0 +1,153 @@
+/*
+JavaScript Snake
+By Patrick Gillespie
+http://patorjk.com/games/snake
+*/
+select {
+	border: black;
+	color: #3E2E44;
+	background: black;
+}
+
+button {
+	border: black;
+	color: #3E2E44;
+	background: black;
+}
+
+body {
+	margin:0px;
+	padding:0px;
+}
+
+#game-area {
+	margin:0px;
+	padding:0px;
+}
+
+#high-score {
+    position: relative;
+    left: 200px;
+    bottom: 50px;
+}
+
+#game-area:focus { outline: none; }
+
+#mode-wrapper {
+    font-family: Verdana, arial, helvetica, sans-serif; 
+    font-size: 14px;
+    color: black;
+}
+
+a.snake-link, a.snake-link:link, a.snake-link:visited {
+  color: black; 
+}
+
+a.snake-link:hover {
+  color: #3E2E44; 
+}
+
+.snake-pause-screen {
+    font-family: Verdana, arial, helvetica, sans-serif; 
+    font-size: 14px;
+    position:absolute;
+    width:300px;
+    height:80px;
+    text-align:center;
+    top:50%;
+    left:50%;
+    margin-top:-40px;
+    margin-left:-150px;
+    display:none;
+    background-color:#3E2E44;
+    color:black;
+}
+
+.snake-panel-component {
+    position: absolute;
+    font-family: Verdana, arial, helvetica, sans-serif; 
+    font-size: 14px;
+    color: black;
+    text-align: center;
+    background-color: #3E2E44;
+    padding: 8px;
+    margin: 0px;
+}
+
+.snake-snakebody-block {
+    margin: 0px;
+    padding: 0px;
+    background-color: #3E2E44;
+    position: absolute;
+    border: 0px solid black;
+    background-repeat: no-repeat;
+}
+
+.snake-snakebody-alive {
+   background-image: url('./images/dark-snakeblock.png');
+}
+.snake-snakebody-dead {
+   background-image: url('./images/dead-dark-snakeblock.png');
+}
+
+.snake-food-block {
+    margin: 0px;
+    padding: 0px;
+    background-color: black;
+    border: 2px solid #3E2E44;
+    position: absolute;
+}
+
+.snake-playing-field {
+    margin: 0px;
+    padding: 0px;
+    position: absolute;
+    background-color: #312E44;
+    border: 3px solid black;
+}
+
+.snake-game-container {
+    margin: 0px;
+    padding: 0px;
+    border-width: 0px;
+    border-style: none;
+    zoom: 1;
+    background-color: #3E2E44;
+    position: relative;
+}
+            
+.snake-welcome-dialog {
+    padding: 8px;
+    margin: 0px;
+    background-color: black;
+    color: #3E2E44;
+    font-family: Verdana, arial, helvetica, sans-serif;
+    font-size: 14px;
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    width: 300px;
+    /*height: 150px;*/
+    margin-top: -100px;
+    margin-left: -158px;
+    text-align: center;
+    display: block;
+}
+
+.snake-try-again-dialog {
+    padding: 8px;
+    margin: 0px;
+    background-color: black;
+    color: #312E44;
+    font-family: Verdana, arial, helvetica, sans-serif;
+    font-size: 14px;
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    width: 300px;
+    height: 100px;
+    margin-top: -75px;
+    margin-left: -158px;
+    text-align: center;
+    display: none;
+    }
diff --git a/Javascript_Snake_Original/css/images/Thumbs.db b/Javascript_Snake_Original/css/images/Thumbs.db
new file mode 100644
index 0000000000000000000000000000000000000000..5892f1859a5a133c474967c2d8fc36ad4cdd72fd
Binary files /dev/null and b/Javascript_Snake_Original/css/images/Thumbs.db differ
diff --git a/Javascript_Snake_Original/css/images/dark-snakeblock.png b/Javascript_Snake_Original/css/images/dark-snakeblock.png
new file mode 100644
index 0000000000000000000000000000000000000000..66c4f1c2779f4bc29d51e16878bb60124560afd4
Binary files /dev/null and b/Javascript_Snake_Original/css/images/dark-snakeblock.png differ
diff --git a/Javascript_Snake_Original/css/images/dead-dark-snakeblock.png b/Javascript_Snake_Original/css/images/dead-dark-snakeblock.png
new file mode 100644
index 0000000000000000000000000000000000000000..63302e51bed87fd0901f23d1cdf0a79f32945824
Binary files /dev/null and b/Javascript_Snake_Original/css/images/dead-dark-snakeblock.png differ
diff --git a/Javascript_Snake_Original/css/images/deadblock.png b/Javascript_Snake_Original/css/images/deadblock.png
new file mode 100644
index 0000000000000000000000000000000000000000..e3d078429747ec9553af61ce0ea03a80aa141f21
Binary files /dev/null and b/Javascript_Snake_Original/css/images/deadblock.png differ
diff --git a/Javascript_Snake_Original/css/images/deadblock_border.png b/Javascript_Snake_Original/css/images/deadblock_border.png
new file mode 100644
index 0000000000000000000000000000000000000000..94b5628e7120bb4105ce8fb1d0d9bd9fab563484
Binary files /dev/null and b/Javascript_Snake_Original/css/images/deadblock_border.png differ
diff --git a/Javascript_Snake_Original/css/images/snakeblock.png b/Javascript_Snake_Original/css/images/snakeblock.png
new file mode 100644
index 0000000000000000000000000000000000000000..e25b646fffce20bf4e9c98e373b868f224cd47db
Binary files /dev/null and b/Javascript_Snake_Original/css/images/snakeblock.png differ
diff --git a/Javascript_Snake_Original/css/main-snake.css b/Javascript_Snake_Original/css/main-snake.css
new file mode 100644
index 0000000000000000000000000000000000000000..03a485c75ae30b101a6b761a5bdbd46f87b6f98c
--- /dev/null
+++ b/Javascript_Snake_Original/css/main-snake.css
@@ -0,0 +1,142 @@
+/*
+JavaScript Snake
+By Patrick Gillespie
+http://patorjk.com/games/snake
+*/
+body {
+	margin:0px;
+	padding:0px;
+}
+
+#game-area {
+	margin:0px;
+	padding:0px;
+}
+
+#high-score {
+    position: relative;
+    left: 200px;
+    bottom: 50px;
+}
+
+#mode-wrapper {
+    color: #ffffff;
+    font-family: Verdana, arial, helvetica, sans-serif; 
+    font-size: 14px;
+    
+}
+
+#game-area:focus { outline: none; }
+
+a.snake-link, a.snake-link:link, a.snake-link:visited {
+  color: #FCFC54; 
+}
+
+a.snake-link:hover {
+  color: #FfFf54; 
+}
+
+.snake-pause-screen {
+    font-family: Verdana, arial, helvetica, sans-serif; 
+    font-size: 14px;
+    position:absolute;
+    width:300px;
+    height:80px;
+    text-align:center;
+    top:50%;
+    left:50%;
+    margin-top:-40px;
+    margin-left:-150px;
+    display:none;
+    background-color:black;
+    color:white;
+}
+
+.snake-panel-component {
+    position: absolute;
+    font-family: Verdana, arial, helvetica, sans-serif; 
+    font-size: 14px;
+    color: #ffffff;
+    text-align: center;
+    background-color: #FC5454;
+    padding: 8px;
+    margin: 0px;
+}
+
+.snake-snakebody-block {
+    margin: 0px;
+    padding: 0px;
+    background-color: #FF0000;
+    position: absolute;
+    border: 0px solid #000080;
+    background-repeat: no-repeat;
+}
+
+.snake-snakebody-alive {
+   background-image: url('./images/snakeblock.png');
+}
+.snake-snakebody-dead {
+   background-image: url('./images/deadblock.png');
+}
+
+.snake-food-block {
+    margin: 0px;
+    padding: 0px;
+    background-color: #FF0000;
+    border: 0px solid #000080;
+    position: absolute;
+}
+
+.snake-playing-field {
+    margin: 0px;
+    padding: 0px;
+    position: absolute;
+    background-color: #0000A8;
+    border: 0px solid #0000A8;
+}
+
+.snake-game-container {
+    margin: 0px;
+    padding: 0px;
+    border-width: 0px;
+    border-style: none;
+    zoom: 1;
+    background-color: #FC5454;
+    position: relative;
+}
+            
+.snake-welcome-dialog {
+    padding: 8px;
+    margin: 0px;
+    background-color: #000000;
+    color: #ffffff;
+    font-family: Verdana, arial, helvetica, sans-serif;
+    font-size: 14px;
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    width: 300px;
+    /*height: 150px;*/
+    margin-top: -100px;
+    margin-left: -158px;
+    text-align: center;
+    display: block;
+}
+
+.snake-try-again-dialog {
+    padding: 8px;
+    margin: 0px;
+    background-color: #000000;
+    color: #ffffff;
+    font-family: Verdana, arial, helvetica, sans-serif;
+    font-size: 14px;
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    width: 300px;
+    height: 100px;
+    margin-top: -75px;
+    margin-left: -158px;
+    text-align: center;
+    display: none;
+    }
diff --git a/Javascript_Snake_Original/index.html b/Javascript_Snake_Original/index.html
new file mode 100644
index 0000000000000000000000000000000000000000..047629278c75617adef7b29f6b2a7011d1467e34
--- /dev/null
+++ b/Javascript_Snake_Original/index.html
@@ -0,0 +1,59 @@
+<!DOCTYPE html> 
+<!--<html manifest="snake.appcache">-->
+<head>
+<!--
+
+JavaScript Snake
+By Patrick Gillespie
+http://patorjk.com/games/snake
+
+Source code is available here: https://github.com/patorjk/JavaScript-Snake
+
+--> 
+    <title>JavaScript Snake</title>
+    <link rel=stylesheet id=style type=text/css href=./css/main-snake.css />
+    <button onclick=getTheme()>Click to use this theme.</button>
+    <select id="select">
+        <option>Dark Theme</option>
+        <option>Revert To Original</option>
+    </select>
+    <div id="mode-wrapper">Select which mode you would like to play in.<br /><button id="Easy">Easy</button><br /><button id="Medium">Medium</button><br /><button id="Difficult">Difficult</button></div>
+<button id="high-score">Get your current high score for this game.</button>
+<script>
+function getTheme () {
+    function changeTheme (Theme) {
+        document.getElementById('style').setAttribute('href', Theme);
+    }
+    var index = document.getElementById("select").selectedIndex;
+    switch (index) {
+        case 0: 
+          changeTheme('css/dark-snake.css');
+          break;
+          case 1: changeTheme('css/main-snake.css');
+    }
+}
+if (navigator.onLine && window.location.hostname === 'patorjk.com') {
+    var _gaq = _gaq || [];
+    _gaq.push(['_setAccount', 'UA-3312460-1']);
+    _gaq.push(['_trackPageview']);
+
+    (function() {
+      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+    })();
+}
+</script>
+</head>
+<body>
+    <div id="game-area" tabindex="0">
+    </div>
+    <script type="text/javascript" src="./js/snake.js"></script>
+    <script type="text/javascript">
+    var mySnakeBoard = new SNAKE.Board(  {
+                                            boardContainer: "game-area",
+                                            fullScreen: true
+                                        });    
+    </script>
+</body>
+</html>
diff --git a/Javascript_Snake_Original/js/snake.js b/Javascript_Snake_Original/js/snake.js
new file mode 100644
index 0000000000000000000000000000000000000000..3c9dabe09e0fb5d45057161e7a836a9b3d929edd
--- /dev/null
+++ b/Javascript_Snake_Original/js/snake.js
@@ -0,0 +1,992 @@
+/*
+JavaScript Snake
+By Patrick Gillespie
+http://patorjk.com/games/snake
+*/
+
+/**
+* @module Snake
+* @class SNAKE
+*/
+
+var SNAKE = SNAKE || {};
+
+/**
+* @method addEventListener
+* @param {Object} obj The object to add an event listener to.
+* @param {String} event The event to listen for.
+* @param {Function} funct The function to execute when the event is triggered.
+* @param {Boolean} evtCapturing True to do event capturing, false to do event bubbling.
+*/
+SNAKE.addEventListener = (function() {
+    if (window.addEventListener) {
+        return function(obj, event, funct, evtCapturing) {
+            obj.addEventListener(event, funct, evtCapturing);
+        };
+    } else if (window.attachEvent) {
+        return function(obj, event, funct) {
+            obj.attachEvent("on" + event, funct);
+        };
+    }
+})();
+
+/**
+* @method removeEventListener
+* @param {Object} obj The object to remove an event listener from.
+* @param {String} event The event that was listened for.
+* @param {Function} funct The function that was executed when the event is triggered.
+* @param {Boolean} evtCapturing True if event capturing was done, false otherwise.
+*/
+
+SNAKE.removeEventListener = (function() {
+    if (window.removeEventListener) {
+        return function(obj, event, funct, evtCapturing) {
+            obj.removeEventListener(event, funct, evtCapturing);
+        };
+    } else if (window.detachEvent) {
+        return function(obj, event, funct) {
+            obj.detachEvent("on" + event, funct);
+        };
+    }
+})();
+
+/**
+* This class manages the snake which will reside inside of a SNAKE.Board object.
+* @class Snake
+* @constructor
+* @namespace SNAKE
+* @param {Object} config The configuration object for the class. Contains playingBoard (the SNAKE.Board that this snake resides in), startRow and startCol.
+*/
+SNAKE.Snake = SNAKE.Snake || (function() {
+    
+    // -------------------------------------------------------------------------
+    // Private static variables and methods
+    // -------------------------------------------------------------------------
+    
+    var instanceNumber = 0;
+    var blockPool = [];
+    
+    var SnakeBlock = function() {
+        this.elm = null;
+        this.elmStyle = null;
+        this.row = -1;
+        this.col = -1;
+        this.xPos = -1000;
+        this.yPos = -1000;
+        this.next = null;
+        this.prev = null;
+    };
+    
+    // this function is adapted from the example at http://greengeckodesign.com/blog/2007/07/get-highest-z-index-in-javascript.html
+    function getNextHighestZIndex(myObj) {
+        var highestIndex = 0,
+            currentIndex = 0,
+            ii;
+        for (ii in myObj) {
+            if (myObj[ii].elm.currentStyle){  
+                currentIndex = parseFloat(myObj[ii].elm.style["z-index"],10);
+            }else if(window.getComputedStyle) {
+                currentIndex = parseFloat(document.defaultView.getComputedStyle(myObj[ii].elm,null).getPropertyValue("z-index"),10);  
+            }
+            if(!isNaN(currentIndex) && currentIndex > highestIndex){
+                highestIndex = currentIndex;
+            }
+        }
+        return(highestIndex+1);  
+    }
+    
+    // -------------------------------------------------------------------------
+    // Contructor + public and private definitions
+    // -------------------------------------------------------------------------
+    
+    /*
+        config options:
+            playingBoard - the SnakeBoard that this snake belongs too.
+            startRow - The row the snake should start on.
+            startCol - The column the snake should start on.
+    */
+    return function(config) {
+    
+        if (!config||!config.playingBoard) {return;}
+    
+        // ----- private variables -----
+
+        var me = this,
+            playingBoard = config.playingBoard,
+            myId = instanceNumber++,
+            growthIncr = 5,
+            moveQueue = [], // a queue that holds the next moves of the snake
+            currentDirection = 1, // 0: up, 1: left, 2: down, 3: right
+            columnShift = [0, 1, 0, -1],
+            rowShift = [-1, 0, 1, 0],
+            xPosShift = [],
+            yPosShift = [],
+            snakeSpeed = 75,
+            isDead = false,
+            isPaused = false;
+        function getMode (mode, speed) {
+    document.getElementById(mode).addEventListener('click', function () { snakeSpeed = speed; });
+}
+            getMode('Easy', 100);
+            getMode('Medium', 75);
+            getMode('Difficult', 50);
+        // ----- public variables -----
+        me.snakeBody = {};
+        me.snakeBody["b0"] = new SnakeBlock(); // create snake head
+        me.snakeBody["b0"].row = config.startRow || 1;
+        me.snakeBody["b0"].col = config.startCol || 1;
+        me.snakeBody["b0"].xPos = me.snakeBody["b0"].row * playingBoard.getBlockWidth();
+        me.snakeBody["b0"].yPos = me.snakeBody["b0"].col * playingBoard.getBlockHeight();
+        me.snakeBody["b0"].elm = createSnakeElement();
+        me.snakeBody["b0"].elmStyle = me.snakeBody["b0"].elm.style;
+        playingBoard.getBoardContainer().appendChild( me.snakeBody["b0"].elm );
+        me.snakeBody["b0"].elm.style.left = me.snakeBody["b0"].xPos + "px";
+        me.snakeBody["b0"].elm.style.top = me.snakeBody["b0"].yPos + "px";
+        me.snakeBody["b0"].next = me.snakeBody["b0"];
+        me.snakeBody["b0"].prev = me.snakeBody["b0"];
+        
+        me.snakeLength = 1;
+        me.snakeHead = me.snakeBody["b0"];
+        me.snakeTail = me.snakeBody["b0"];
+        me.snakeHead.elm.className = me.snakeHead.elm.className.replace(/\bsnake-snakebody-dead\b/,'');
+        me.snakeHead.elm.className += " snake-snakebody-alive";
+        
+        // ----- private methods -----
+        
+        function createSnakeElement() {
+            var tempNode = document.createElement("div");
+            tempNode.className = "snake-snakebody-block";
+            tempNode.style.left = "-1000px";
+            tempNode.style.top = "-1000px";
+            tempNode.style.width = playingBoard.getBlockWidth() + "px";
+            tempNode.style.height = playingBoard.getBlockHeight() + "px";
+            return tempNode;
+        }
+        
+        function createBlocks(num) {
+            var tempBlock;
+            var tempNode = createSnakeElement();
+
+            for (var ii = 1; ii < num; ii++){
+                tempBlock = new SnakeBlock();
+                tempBlock.elm = tempNode.cloneNode(true);
+                tempBlock.elmStyle = tempBlock.elm.style;
+                playingBoard.getBoardContainer().appendChild( tempBlock.elm );
+                blockPool[blockPool.length] = tempBlock;
+            }
+            
+            tempBlock = new SnakeBlock();
+            tempBlock.elm = tempNode;
+            playingBoard.getBoardContainer().appendChild( tempBlock.elm );
+            blockPool[blockPool.length] = tempBlock;
+        }
+        
+        // ----- public methods -----
+        
+        me.setPaused = function(val) {
+            isPaused = val;
+        };
+        me.getPaused = function() {
+            return isPaused;
+        };
+        
+        /**
+        * This method is called when a user presses a key. It logs arrow key presses in "moveQueue", which is used when the snake needs to make its next move.
+        * @method handleArrowKeys
+        * @param {Number} keyNum A number representing the key that was pressed.
+        */
+        /*
+            Handles what happens when an arrow key is pressed. 
+            Direction explained (0 = up, etc etc)
+                    0
+                  3   1
+                    2
+        */
+        me.handleArrowKeys = function(keyNum) {
+            if (isDead || isPaused) {return;}
+            
+            var snakeLength = me.snakeLength;
+            var lastMove = moveQueue[0] || currentDirection;
+
+            //console.log("lastmove="+lastMove);
+            //console.log("dir="+keyNum);
+            
+            switch (keyNum) {
+                case 37:
+                case 65:
+                    if ( lastMove !== 1 || snakeLength === 1 ) {
+                        moveQueue.unshift(3); //SnakeDirection = 3;
+                    }
+                    break;    
+                case 38:
+                case 87:
+                    if ( lastMove !== 2 || snakeLength === 1 ) {
+                        moveQueue.unshift(0);//SnakeDirection = 0;
+                    }
+                    break;    
+                case 39:
+                case 68:
+                    if ( lastMove !== 3 || snakeLength === 1 ) {
+                        moveQueue.unshift(1); //SnakeDirection = 1;
+                    }
+                    break;    
+                case 40:
+                case 83:
+                    if ( lastMove !== 0 || snakeLength === 1 ) {
+                        moveQueue.unshift(2);//SnakeDirection = 2;
+                    }
+                    break;  
+            }
+        };
+        
+        /**
+        * This method is executed for each move of the snake. It determines where the snake will go and what will happen to it. This method needs to run quickly.
+        * @method go
+        */
+        me.go = function() {
+        
+            var oldHead = me.snakeHead,
+                newHead = me.snakeTail,
+                myDirection = currentDirection,
+                grid = playingBoard.grid; // cache grid for quicker lookup
+        
+            if (isPaused === true) {
+                setTimeout(function(){me.go();}, snakeSpeed);
+                return;
+            }
+        
+            me.snakeTail = newHead.prev;
+            me.snakeHead = newHead;
+        
+            // clear the old board position
+            if ( grid[newHead.row] && grid[newHead.row][newHead.col] ) {
+                grid[newHead.row][newHead.col] = 0;
+            }
+        
+            if (moveQueue.length){
+                myDirection = currentDirection = moveQueue.pop();
+            }
+        
+            newHead.col = oldHead.col + columnShift[myDirection];
+            newHead.row = oldHead.row + rowShift[myDirection];
+            newHead.xPos = oldHead.xPos + xPosShift[myDirection];
+            newHead.yPos = oldHead.yPos + yPosShift[myDirection];
+            
+            if ( !newHead.elmStyle ) {
+                newHead.elmStyle = newHead.elm.style;
+            }
+            
+            newHead.elmStyle.left = newHead.xPos + "px";
+            newHead.elmStyle.top = newHead.yPos + "px";
+
+            // check the new spot the snake moved into
+
+            if (grid[newHead.row][newHead.col] === 0) {
+                grid[newHead.row][newHead.col] = 1;
+                setTimeout(function(){me.go();}, snakeSpeed);
+            } else if (grid[newHead.row][newHead.col] > 0) {
+                me.handleDeath();
+            } else if (grid[newHead.row][newHead.col] === playingBoard.getGridFoodValue()) {
+                grid[newHead.row][newHead.col] = 1;
+                me.eatFood();
+                setTimeout(function(){me.go();}, snakeSpeed);
+            }
+        };
+        
+        /**
+        * This method is called when it is determined that the snake has eaten some food.
+        * @method eatFood
+        */
+        me.eatFood = function() {
+            if (blockPool.length <= growthIncr) {
+                createBlocks(growthIncr*2);
+            }
+            var blocks = blockPool.splice(0, growthIncr);
+            
+            var ii = blocks.length,
+                index,
+                prevNode = me.snakeTail;
+            while (ii--) {
+                index = "b" + me.snakeLength++;
+                me.snakeBody[index] = blocks[ii];
+                me.snakeBody[index].prev = prevNode;
+                me.snakeBody[index].elm.className = me.snakeHead.elm.className.replace(/\bsnake-snakebody-dead\b/,'')
+                me.snakeBody[index].elm.className += " snake-snakebody-alive";
+                prevNode.next = me.snakeBody[index];
+                prevNode = me.snakeBody[index];
+            }
+            me.snakeTail = me.snakeBody[index];
+            me.snakeTail.next = me.snakeHead;
+            me.snakeHead.prev = me.snakeTail;
+
+            playingBoard.foodEaten();
+        };
+        
+        /**
+        * This method handles what happens when the snake dies.
+        * @method handleDeath
+        */
+        me.handleDeath = function() {
+            function recordScore () {
+                var highScore = localStorage.jsSnakeHighScore;
+                if (highScore == undefined) localStorage.setItem('jsSnakeHighScore', me.snakeLength);
+                if (me.snakeLength > highScore) {
+                    alert('Congratulations! You have beaten your previous high score, which was ' + highScore + '.');
+                        localStorage.setItem('jsSnakeHighScore', me.snakeLength);
+                }
+}
+            recordScore();
+            me.snakeHead.elm.style.zIndex = getNextHighestZIndex(me.snakeBody);
+            me.snakeHead.elm.className = me.snakeHead.elm.className.replace(/\bsnake-snakebody-alive\b/,'')
+            me.snakeHead.elm.className += " snake-snakebody-dead";
+
+            isDead = true;
+            playingBoard.handleDeath();
+            moveQueue.length = 0;
+        };
+
+        /**
+        * This method sets a flag that lets the snake be alive again.
+        * @method rebirth
+        */   
+        me.rebirth = function() {
+            isDead = false;
+        };
+        
+        /**
+        * This method reset the snake so it is ready for a new game.
+        * @method reset
+        */        
+        me.reset = function() {
+            if (isDead === false) {return;}
+            
+            var blocks = [],
+                curNode = me.snakeHead.next,
+                nextNode;
+            while (curNode !== me.snakeHead) {
+                nextNode = curNode.next;
+                curNode.prev = null;
+                curNode.next = null;
+                blocks.push(curNode);
+                curNode = nextNode;
+            }
+            me.snakeHead.next = me.snakeHead;
+            me.snakeHead.prev = me.snakeHead;
+            me.snakeTail = me.snakeHead;
+            me.snakeLength = 1;
+            
+            for (var ii = 0; ii < blocks.length; ii++) {
+                blocks[ii].elm.style.left = "-1000px";
+                blocks[ii].elm.style.top = "-1000px";
+                blocks[ii].elm.className = me.snakeHead.elm.className.replace(/\bsnake-snakebody-dead\b/,'')
+                blocks[ii].elm.className += " snake-snakebody-alive";
+            }
+            
+            blockPool.concat(blocks);
+            me.snakeHead.elm.className = me.snakeHead.elm.className.replace(/\bsnake-snakebody-dead\b/,'')
+            me.snakeHead.elm.className += " snake-snakebody-alive";
+            me.snakeHead.row = config.startRow || 1;
+            me.snakeHead.col = config.startCol || 1;
+            me.snakeHead.xPos = me.snakeHead.row * playingBoard.getBlockWidth();
+            me.snakeHead.yPos = me.snakeHead.col * playingBoard.getBlockHeight();
+            me.snakeHead.elm.style.left = me.snakeHead.xPos + "px";
+            me.snakeHead.elm.style.top = me.snakeHead.yPos + "px";
+        };
+        
+        // ---------------------------------------------------------------------
+        // Initialize
+        // ---------------------------------------------------------------------
+        createBlocks(growthIncr*2);
+        xPosShift[0] = 0;
+        xPosShift[1] = playingBoard.getBlockWidth();
+        xPosShift[2] = 0;
+        xPosShift[3] = -1 * playingBoard.getBlockWidth();
+        
+        yPosShift[0] = -1 * playingBoard.getBlockHeight();
+        yPosShift[1] = 0;
+        yPosShift[2] = playingBoard.getBlockHeight();
+        yPosShift[3] = 0;
+    };
+})();
+
+/**
+* This class manages the food which the snake will eat.
+* @class Food
+* @constructor
+* @namespace SNAKE
+* @param {Object} config The configuration object for the class. Contains playingBoard (the SNAKE.Board that this food resides in).
+*/
+
+SNAKE.Food = SNAKE.Food || (function() {
+    
+    // -------------------------------------------------------------------------
+    // Private static variables and methods
+    // -------------------------------------------------------------------------
+    
+    var instanceNumber = 0;
+    
+    function getRandomPosition(x, y){
+        return Math.floor(Math.random()*(y+1-x)) + x; 
+    }
+    
+    // -------------------------------------------------------------------------
+    // Contructor + public and private definitions
+    // -------------------------------------------------------------------------
+    
+    /*
+        config options:
+            playingBoard - the SnakeBoard that this object belongs too.
+    */
+    return function(config) {
+        
+        if (!config||!config.playingBoard) {return;}
+
+        // ----- private variables -----
+
+        var me = this;
+        var playingBoard = config.playingBoard;
+        var fRow, fColumn;
+        var myId = instanceNumber++;
+
+        var elmFood = document.createElement("div");
+        elmFood.setAttribute("id", "snake-food-"+myId);
+        elmFood.className = "snake-food-block";
+        elmFood.style.width = playingBoard.getBlockWidth() + "px";
+        elmFood.style.height = playingBoard.getBlockHeight() + "px";
+        elmFood.style.left = "-1000px";
+        elmFood.style.top = "-1000px";
+        playingBoard.getBoardContainer().appendChild(elmFood);
+        
+        // ----- public methods -----
+        
+        /**
+        * @method getFoodElement
+        * @return {DOM Element} The div the represents the food.
+        */        
+        me.getFoodElement = function() {
+            return elmFood;  
+        };
+        
+        /**
+        * Randomly places the food onto an available location on the playing board.
+        * @method randomlyPlaceFood
+        */    
+        me.randomlyPlaceFood = function() {
+            // if there exist some food, clear its presence from the board
+            if (playingBoard.grid[fRow] && playingBoard.grid[fRow][fColumn] === playingBoard.getGridFoodValue()){
+                playingBoard.grid[fRow][fColumn] = 0; 
+            }
+
+            var row = 0, col = 0, numTries = 0;
+
+            var maxRows = playingBoard.grid.length-1;
+            var maxCols = playingBoard.grid[0].length-1;
+            
+            while (playingBoard.grid[row][col] !== 0){
+                row = getRandomPosition(1, maxRows);
+                col = getRandomPosition(1, maxCols);
+
+                // in some cases there may not be any room to put food anywhere
+                // instead of freezing, exit out
+                numTries++;
+                if (numTries > 20000){
+                    row = -1;
+                    col = -1;
+                    break; 
+                } 
+            }
+
+            playingBoard.grid[row][col] = playingBoard.getGridFoodValue();
+            fRow = row;
+            fColumn = col;
+            elmFood.style.top = row * playingBoard.getBlockHeight() + "px";
+            elmFood.style.left = col * playingBoard.getBlockWidth() + "px";
+        };
+    };
+})();
+
+/**
+* This class manages playing board for the game.
+* @class Board
+* @constructor
+* @namespace SNAKE
+* @param {Object} config The configuration object for the class. Set fullScreen equal to true if you want the game to take up the full screen, otherwise, set the top, left, width and height parameters.
+*/
+
+SNAKE.Board = SNAKE.Board || (function() {
+
+    // -------------------------------------------------------------------------
+    // Private static variables and methods
+    // -------------------------------------------------------------------------
+
+    var instanceNumber = 0;
+
+    // this function is adapted from the example at http://greengeckodesign.com/blog/2007/07/get-highest-z-index-in-javascript.html
+    function getNextHighestZIndex(myObj) {
+        var highestIndex = 0,
+            currentIndex = 0,
+            ii;
+        for (ii in myObj) {
+            if (myObj[ii].elm.currentStyle){  
+                currentIndex = parseFloat(myObj[ii].elm.style["z-index"],10);
+            }else if(window.getComputedStyle) {
+                currentIndex = parseFloat(document.defaultView.getComputedStyle(myObj[ii].elm,null).getPropertyValue("z-index"),10);  
+            }
+            if(!isNaN(currentIndex) && currentIndex > highestIndex){
+                highestIndex = currentIndex;
+            }
+        }
+        return(highestIndex+1);  
+    }
+
+    /*
+        This function returns the width of the available screen real estate that we have
+    */
+    function getClientWidth(){
+        var myWidth = 0;
+        if( typeof window.innerWidth === "number" ) {
+            myWidth = window.innerWidth;//Non-IE
+        } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
+            myWidth = document.documentElement.clientWidth;//IE 6+ in 'standards compliant mode'
+        } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
+            myWidth = document.body.clientWidth;//IE 4 compatible
+        } 
+        return myWidth;
+    }
+    /*
+        This function returns the height of the available screen real estate that we have
+    */
+    function getClientHeight(){
+        var myHeight = 0;
+        if( typeof window.innerHeight === "number" ) {
+            myHeight = window.innerHeight;//Non-IE
+        } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
+            myHeight = document.documentElement.clientHeight;//IE 6+ in 'standards compliant mode'
+        } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
+            myHeight = document.body.clientHeight;//IE 4 compatible
+        } 
+        return myHeight;
+    }
+
+    // -------------------------------------------------------------------------
+    // Contructor + public and private definitions
+    // -------------------------------------------------------------------------
+    
+    return function(inputConfig) {
+    
+        // --- private variables ---
+        var me = this,
+            myId = instanceNumber++,
+            config = inputConfig || {},
+            MAX_BOARD_COLS = 250,
+            MAX_BOARD_ROWS = 250,
+            blockWidth = 20,
+            blockHeight = 20,
+            GRID_FOOD_VALUE = -1, // the value of a spot on the board that represents snake food, MUST BE NEGATIVE
+            myFood,
+            mySnake,
+            boardState = 1, // 0: in active; 1: awaiting game start; 2: playing game
+            myKeyListener,
+            isPaused = false,//note: both the board and the snake can be paused
+            // Board components
+            elmContainer, elmPlayingField, elmAboutPanel, elmLengthPanel, elmWelcome, elmTryAgain, elmPauseScreen;
+        
+        // --- public variables ---
+        me.grid = [];
+        
+        // ---------------------------------------------------------------------
+        // private functions
+        // ---------------------------------------------------------------------
+        
+        function createBoardElements() {
+            elmPlayingField = document.createElement("div");
+            elmPlayingField.setAttribute("id", "playingField");
+            elmPlayingField.className = "snake-playing-field";
+            
+            SNAKE.addEventListener(elmPlayingField, "click", function() {
+                elmContainer.focus();
+            }, false);
+            
+            elmPauseScreen = document.createElement("div");
+            elmPauseScreen.className = "snake-pause-screen";
+            elmPauseScreen.innerHTML = "<div style='padding:10px;'>[Paused]<p/>Press [space] to unpause.</div>";
+            
+            elmAboutPanel = document.createElement("div");
+            elmAboutPanel.className = "snake-panel-component";
+            elmAboutPanel.innerHTML = "<a href='http://patorjk.com/blog/software/' class='snake-link'>more patorjk.com apps</a> - <a href='https://github.com/patorjk/JavaScript-Snake' class='snake-link'>source code</a>";
+            
+            elmLengthPanel = document.createElement("div");
+            elmLengthPanel.className = "snake-panel-component";
+            elmLengthPanel.innerHTML = "Length: 1";
+            
+            elmWelcome = createWelcomeElement();
+            elmTryAgain = createTryAgainElement();
+            
+            SNAKE.addEventListener( elmContainer, "keyup", function(evt) {
+                if (!evt) var evt = window.event;
+                evt.cancelBubble = true;
+                if (evt.stopPropagation) {evt.stopPropagation();}
+                if (evt.preventDefault) {evt.preventDefault();}
+                return false;
+            }, false);
+            
+            elmContainer.className = "snake-game-container";
+            
+            elmPauseScreen.style.zIndex = 10000;
+            elmContainer.appendChild(elmPauseScreen);
+            elmContainer.appendChild(elmPlayingField);
+            elmContainer.appendChild(elmAboutPanel);
+            elmContainer.appendChild(elmLengthPanel);
+            elmContainer.appendChild(elmWelcome);
+            elmContainer.appendChild(elmTryAgain);
+            
+            mySnake = new SNAKE.Snake({playingBoard:me,startRow:2,startCol:2});
+            myFood = new SNAKE.Food({playingBoard: me});
+            
+            elmWelcome.style.zIndex = 1000;
+        }
+        function maxBoardWidth() {
+            return MAX_BOARD_COLS * me.getBlockWidth();   
+        }
+        function maxBoardHeight() {
+            return MAX_BOARD_ROWS * me.getBlockHeight();
+        }
+        
+        function createWelcomeElement() {
+             var tmpElm = document.createElement("div");
+            tmpElm.id = "sbWelcome" + myId;
+            tmpElm.className = "snake-welcome-dialog";
+            
+            var welcomeTxt = document.createElement("div");
+            var fullScreenText = "";
+            if (config.fullScreen) {
+                fullScreenText = "On Windows, press F11 to play in Full Screen mode.";   
+            }
+            welcomeTxt.innerHTML = "JavaScript Snake<p></p>Use the <strong>arrow keys</strong> on your keyboard to play the game. " + fullScreenText + "<p></p>";
+            var welcomeStart = document.createElement("button");
+            welcomeStart.appendChild(document.createTextNode("Play Game"));
+            var loadGame = function() {
+                SNAKE.removeEventListener(window, "keyup", kbShortcut, false);
+                tmpElm.style.display = "none";
+                me.setBoardState(1);
+                me.getBoardContainer().focus();
+            };
+            
+            var kbShortcut = function(evt) {
+                if (!evt) var evt = window.event;
+                var keyNum = (evt.which) ? evt.which : evt.keyCode;
+                if (keyNum === 32 || keyNum === 13) {
+                    loadGame();
+                }
+            };
+            SNAKE.addEventListener(window, "keyup", kbShortcut, false);
+            SNAKE.addEventListener(welcomeStart, "click", loadGame, false);
+            
+            tmpElm.appendChild(welcomeTxt);
+            tmpElm.appendChild(welcomeStart);
+            return tmpElm;
+        }
+        
+        function createTryAgainElement() {
+            var tmpElm = document.createElement("div");
+            tmpElm.id = "sbTryAgain" + myId;
+            tmpElm.className = "snake-try-again-dialog";
+            
+            var tryAgainTxt = document.createElement("div");
+            tryAgainTxt.innerHTML = "JavaScript Snake<p></p>You died :(.<p></p>";
+            var tryAgainStart = document.createElement("button");
+            tryAgainStart.appendChild( document.createTextNode("Play Again?"));
+            
+            var reloadGame = function() {
+                tmpElm.style.display = "none";
+                me.resetBoard();
+                me.setBoardState(1);
+                me.getBoardContainer().focus();
+            };
+            
+            var kbTryAgainShortcut = function(evt) {
+                if (boardState !== 0 || tmpElm.style.display !== "block") {return;}
+                if (!evt) var evt = window.event;
+                var keyNum = (evt.which) ? evt.which : evt.keyCode;
+                if (keyNum === 32 || keyNum === 13) {
+                    reloadGame();
+                }
+            };
+            SNAKE.addEventListener(window, "keyup", kbTryAgainShortcut, true);
+            
+            SNAKE.addEventListener(tryAgainStart, "click", reloadGame, false);
+            tmpElm.appendChild(tryAgainTxt);
+            tmpElm.appendChild(tryAgainStart);
+            return tmpElm;
+        }
+        // ---------------------------------------------------------------------
+        // public functions
+        // ---------------------------------------------------------------------
+        
+        me.setPaused = function(val) {
+            isPaused = val;
+            mySnake.setPaused(val);
+            if (isPaused) {
+                elmPauseScreen.style.display = "block";
+            } else {
+                elmPauseScreen.style.display = "none";
+            }
+        };
+        me.getPaused = function() {
+            return isPaused;
+        };
+        
+        /**
+        * Resets the playing board for a new game.
+        * @method resetBoard
+        */   
+        me.resetBoard = function() {
+            SNAKE.removeEventListener(elmContainer, "keydown", myKeyListener, false);
+            mySnake.reset();
+            elmLengthPanel.innerHTML = "Length: 1";
+            me.setupPlayingField();
+        };
+        /**
+        * Gets the current state of the playing board. There are 3 states: 0 - Welcome or Try Again dialog is present. 1 - User has pressed "Start Game" on the Welcome or Try Again dialog but has not pressed an arrow key to move the snake. 2 - The game is in progress and the snake is moving.
+        * @method getBoardState
+        * @return {Number} The state of the board.
+        */  
+        me.getBoardState = function() {
+            return boardState;
+        };
+        /**
+        * Sets the current state of the playing board. There are 3 states: 0 - Welcome or Try Again dialog is present. 1 - User has pressed "Start Game" on the Welcome or Try Again dialog but has not pressed an arrow key to move the snake. 2 - The game is in progress and the snake is moving.
+        * @method setBoardState
+        * @param {Number} state The state of the board.
+        */  
+        me.setBoardState = function(state) {
+            boardState = state;
+        };
+        /**
+        * @method getGridFoodValue
+        * @return {Number} A number that represents food on a number representation of the playing board.
+        */  
+        me.getGridFoodValue = function() {
+            return GRID_FOOD_VALUE;
+        };
+        /**
+        * @method getPlayingFieldElement
+        * @return {DOM Element} The div representing the playing field (this is where the snake can move).
+        */ 
+        me.getPlayingFieldElement = function() {
+            return elmPlayingField;
+        };
+        /**
+        * @method setBoardContainer
+        * @param {DOM Element or String} myContainer Sets the container element for the game.
+        */ 
+        me.setBoardContainer = function(myContainer) {
+            if (typeof myContainer === "string") {
+                myContainer = document.getElementById(myContainer);   
+            }
+            if (myContainer === elmContainer) {return;}
+            elmContainer = myContainer;
+            elmPlayingField = null;
+            
+            me.setupPlayingField();
+        };
+        /**
+        * @method getBoardContainer
+        * @return {DOM Element}
+        */ 
+        me.getBoardContainer = function() {
+            return elmContainer;
+        };
+        /**
+        * @method getBlockWidth
+        * @return {Number}
+        */ 
+        me.getBlockWidth = function() {
+            return blockWidth;  
+        };
+        /**
+        * @method getBlockHeight
+        * @return {Number}
+        */ 
+        me.getBlockHeight = function() {
+            return blockHeight;  
+        };
+        /**
+        * Sets up the playing field.
+        * @method setupPlayingField
+        */ 
+        me.setupPlayingField = function () {
+            
+            if (!elmPlayingField) {createBoardElements();} // create playing field
+            
+            // calculate width of our game container
+            var cWidth, cHeight;
+            if (config.fullScreen === true) {
+                cTop = 0;
+                cLeft = 0;
+                cWidth = getClientWidth()-5;
+                cHeight = getClientHeight()-5;
+                document.body.style.backgroundColor = "#FC5454";
+            } else {
+                cTop = config.top;
+                cLeft = config.left;
+                cWidth = config.width;
+                cHeight = config.height;
+            }
+            
+            // define the dimensions of the board and playing field
+            var wEdgeSpace = me.getBlockWidth()*2 + (cWidth % me.getBlockWidth());
+            var fWidth = Math.min(maxBoardWidth()-wEdgeSpace,cWidth-wEdgeSpace);
+            var hEdgeSpace = me.getBlockHeight()*3 + (cHeight % me.getBlockHeight());
+            var fHeight = Math.min(maxBoardHeight()-hEdgeSpace,cHeight-hEdgeSpace);
+            
+            elmContainer.style.left = cLeft + "px";
+            elmContainer.style.top = cTop + "px";
+            elmContainer.style.width = cWidth + "px";
+            elmContainer.style.height = cHeight + "px";
+            elmPlayingField.style.left = me.getBlockWidth() + "px";
+            elmPlayingField.style.top  = me.getBlockHeight() + "px";
+            elmPlayingField.style.width = fWidth + "px";
+            elmPlayingField.style.height = fHeight + "px";
+            
+            // the math for this will need to change depending on font size, padding, etc
+            // assuming height of 14 (font size) + 8 (padding)
+            var bottomPanelHeight = hEdgeSpace - me.getBlockHeight();
+            var pLabelTop = me.getBlockHeight() + fHeight + Math.round((bottomPanelHeight - 30)/2) + "px";
+            
+            elmAboutPanel.style.top = pLabelTop;
+            elmAboutPanel.style.width = "450px";
+            elmAboutPanel.style.left = Math.round(cWidth/2) - Math.round(450/2) + "px";
+            
+            elmLengthPanel.style.top = pLabelTop;
+            elmLengthPanel.style.left = cWidth - 120 + "px";
+            
+            // if width is too narrow, hide the about panel
+            if (cWidth < 700) {
+                elmAboutPanel.style.display = "none";
+            } else {
+                elmAboutPanel.style.display = "block";
+            }
+            
+            me.grid = [];
+            var numBoardCols = fWidth / me.getBlockWidth() + 2;
+            var numBoardRows = fHeight / me.getBlockHeight() + 2;
+            
+            for (var row = 0; row < numBoardRows; row++) {
+                me.grid[row] = [];
+                for (var col = 0; col < numBoardCols; col++) {
+                    if (col === 0 || row === 0 || col === (numBoardCols-1) || row === (numBoardRows-1)) {
+                        me.grid[row][col] = 1; // an edge
+                    } else {
+                        me.grid[row][col] = 0; // empty space
+                    }
+                }
+            }
+            
+            myFood.randomlyPlaceFood();
+            
+            // setup event listeners
+            function getMode (mode, speed) {
+    document.getElementById(mode).addEventListener('click', function () { snakeSpeed = speed; });
+}
+            getMode('Easy', 100);
+            getMode('Medium', 75);
+            getMode('Difficult', 50);
+            myKeyListener = function(evt) {
+                if (!evt) var evt = window.event;
+                var keyNum = (evt.which) ? evt.which : evt.keyCode;
+
+                if (me.getBoardState() === 1) {
+                    if ( !(keyNum >= 37 && keyNum <= 40) && !(keyNum === 87 || keyNum === 65 || keyNum === 83 || keyNum === 68)) {return;} // if not an arrow key, leave
+                    
+                    // This removes the listener added at the #listenerX line
+                    SNAKE.removeEventListener(elmContainer, "keydown", myKeyListener, false);
+                    
+                    myKeyListener = function(evt) {
+                        if (!evt) var evt = window.event;
+                        var keyNum = (evt.which) ? evt.which : evt.keyCode;
+                        
+                        //console.log(keyNum);
+                        if (keyNum === 32) {
+							if(me.getBoardState()!=0)
+                                me.setPaused(!me.getPaused());
+                        }
+                        
+                        mySnake.handleArrowKeys(keyNum);
+                        
+                        evt.cancelBubble = true;
+                        if (evt.stopPropagation) {evt.stopPropagation();}
+                        if (evt.preventDefault) {evt.preventDefault();}
+                        return false;
+                    };
+                    SNAKE.addEventListener( elmContainer, "keydown", myKeyListener, false);
+                    
+                    mySnake.rebirth();
+                    mySnake.handleArrowKeys(keyNum);
+                    me.setBoardState(2); // start the game!
+                    mySnake.go();
+                }
+                
+                evt.cancelBubble = true;
+                if (evt.stopPropagation) {evt.stopPropagation();}
+                if (evt.preventDefault) {evt.preventDefault();}
+                return false;
+            };
+            
+            // Search for #listenerX to see where this is removed
+            SNAKE.addEventListener( elmContainer, "keydown", myKeyListener, false);
+        };
+        
+        /**
+        * This method is called when the snake has eaten some food.
+        * @method foodEaten
+        */ 
+        me.foodEaten = function() {
+            elmLengthPanel.innerHTML = "Length: " + mySnake.snakeLength;
+            myFood.randomlyPlaceFood();
+        };
+        
+        /**
+        * This method is called when the snake dies.
+        * @method handleDeath
+        */ 
+        me.handleDeath = function() {
+            var index = Math.max(getNextHighestZIndex( mySnake.snakeBody), getNextHighestZIndex( {tmp:{elm:myFood.getFoodElement()}} ));
+            elmContainer.removeChild(elmTryAgain);
+            elmContainer.appendChild(elmTryAgain);
+            elmTryAgain.style.zIndex = index;
+            elmTryAgain.style.display = "block";
+            me.setBoardState(0);
+        };
+        
+        // ---------------------------------------------------------------------
+        // Initialize
+        // ---------------------------------------------------------------------
+
+        config.fullScreen = (typeof config.fullScreen === "undefined") ? false : config.fullScreen;        
+        config.top = (typeof config.top === "undefined") ? 0 : config.top;
+        config.left = (typeof config.left === "undefined") ? 0 : config.left;
+        config.width = (typeof config.width === "undefined") ? 400 : config.width;        
+        config.height = (typeof config.height === "undefined") ? 400 : config.height;
+        
+        if (config.fullScreen) {
+            SNAKE.addEventListener(window,"resize", function() {
+                me.setupPlayingField();
+            }, false);
+        }
+        
+        me.setBoardState(0);
+        
+        if (config.boardContainer) {
+            me.setBoardContainer(config.boardContainer);
+        }
+        
+    }; // end return function
+})();
+function getHighScore () {
+    document.getElementById('high-score').addEventListener('click', function () {
+        if (localStorage.jsSnakeHighScore == undefined) alert('You have not played this game yet!');
+        else
+    alert('Your current high score is ' + localStorage.jsSnakeHighScore + '.'); });
+}
+getHighScore();