*added the function to place snakes food on board
  *I thought I had created this function already
    So I either didnt push my last commit from home
    or I royally messed up in some other way.
  *The food will be refreshed every call of executeTurn
diff --git a/src/snakeJS.js b/src/snakeJS.js
index da4809f..720b95a 100644
--- a/src/snakeJS.js
+++ b/src/snakeJS.js
@@ -11,7 +11,7 @@ window.addEventListener( 'load', function(){
 function SnakeGameController(){
 	this.View = new SnakeView();
 	this.Model = new SnakeModel();
-	this.conInterval = setInterval();
+	this.conInterval = setInterval();
 	this.snakeGameBoard = [];
 	this.snakeFoodPosition = null
 }
@@ -34,7 +34,7 @@ SnakeGameController.prototype = {
 	},

 	randomNumberGen: function(){
-		randomNum= Math.random() * (400 - 0)
+		randomNum= Math.random() * (400 - 0)
 		randomNum= Math.round(randomNum)
 		return randomNum
 	},
@@ -65,17 +65,17 @@ SnakeGameController.prototype = {
 		  		this.Model.changeDirectionLeft();
 		  	break;

-		  	case 38:
+		  	case 38:
 		  		event.preventDefault()
 		  		this.Model.changeDirectionUp();
 		  	break;

 		  	case 39:
-		  		event.preventDefault()
+		  		event.preventDefault()
 		  		this.Model.changeDirectionRight();
 		  	break;

-		  	case 40:
+		  	case 40:
 		  		event.preventDefault()
 		  		this.Model.changeDirectionDown();
 		  	break;
@@ -89,9 +89,9 @@ SnakeGameController.prototype = {
 	executeTurn: function(){
 		this.View.refreshScreen();
 		this.View.updateSnakeScreen(this.Model.allSnakeBodyPositions());
+		this.View.paintFoodOnCanvas(this.snakeFoodPosition)
 		this.Model.moveSnake();
 		this.placeSnakeOnBoard()
-		console.log(this.Model.snakeBody[1].boardPos)
 		this.gameIsActive()
 	},

diff --git a/src/snakeJSView.js b/src/snakeJSView.js
index ee2bae3..758dfbf 100644
--- a/src/snakeJSView.js
+++ b/src/snakeJSView.js
@@ -20,8 +20,13 @@ SnakeView.prototype = {
 		this.canvasContext.fillRect( this.findXAxis( growthPos ), this.findYAxis( growthPos ), 25, 25 )
 	},

+	paintFoodOnCanvas: function(foodPos){
+		this.canvasContext.fillStyle= "rgba(255,0,0,1)"
+		this.canvasContext.fillRect( this.findXAxis( foodPos ), this.findYAxis( foodPos), 25, 25 )
+	},
+
 	findXAxis: function(growthPos){
-		return ( growthPos%20 )*25
+		return ( growthPos%20 )*25
 	},

 	findYAxis: function(growthPos){
  *Refactored moveSnake function. The logic was wrong and
    there was a redundancy.
  *Created a fullViewRefresh function to execute all view
    methods at once to create a more fluid look to the
    movement of the snake.
  *Created snakeEatingCheck to see if the snake has
    gotten to a place where there is food.
  *Once the snakeEatingCheck runs true it will automatically
    execute snakeHasEaten function.
  *The snakeHasEaten function will:
     put new food on the board
     make the snake grow
     refresh the screen
     add to the player's score
  *The fluidity of movement when the snake eats is still
    somewhat awkward. I would like to optimize the movements
    of the snake
  *The score still does not show on the screen yet.
  *There are still no proper death conditions for the snake.

diff --git a/src/snakeJS.js b/src/snakeJS.js
index 720b95a..e1241ee 100644
--- a/src/snakeJS.js
+++ b/src/snakeJS.js
@@ -14,6 +14,7 @@ function SnakeGameController(){
 	this.conInterval = setInterval();
 	this.snakeGameBoard = [];
 	this.snakeFoodPosition = null
+	this.playerScore = 0
 }

 SnakeGameController.prototype = {
@@ -87,12 +88,31 @@ SnakeGameController.prototype = {
 	},

 	executeTurn: function(){
+		this.fullViewRefresh()
+		this.Model.moveSnake();
+		this.placeSnakeOnBoard()
+		this.snakeEatingCheck();
+		this.gameIsActive()
+	},
+
+	fullViewRefresh: function(){
 		this.View.refreshScreen();
 		this.View.updateSnakeScreen(this.Model.allSnakeBodyPositions());
 		this.View.paintFoodOnCanvas(this.snakeFoodPosition)
+	},
+
+	snakeEatingCheck: function(){
+		if(this.Model.snakeBody[0].boardPos === this.snakeFoodPosition){
+			this.snakeHasEaten()
+		}
+	},
+
+	snakeHasEaten: function(){
+		this.setFood()
+		this.Model.growSnake();
 		this.Model.moveSnake();
-		this.placeSnakeOnBoard()
-		this.gameIsActive()
+		this.fullViewRefresh();
+		this.playerScore +=1
 	},

 	gameIsActive: function(){
diff --git a/src/snakeJSModel.js b/src/snakeJSModel.js
index 21e04e2..2bec1d0 100644
--- a/src/snakeJSModel.js
+++ b/src/snakeJSModel.js
@@ -11,6 +11,11 @@ SnakeModel.prototype = {
 	snakeBodyLength: function(){
 		return this.snakeBody.length
 	},
+
+	growSnake: function(){
+		this.snakeBody.push(new SnakeGrowth(null, this.snakeBodyLength()))
+	},
+
 	allSnakeBodyPositions: function(){
 		arrayOfPositions = []
 		for(var x=0; x<this.snakeBodyLength(); x++){
@@ -20,10 +25,10 @@ SnakeModel.prototype = {
 	},

 	moveSnake: function(){
-		for(var x=0; x<=(this.snakeBodyLength()-2); x++){
-			this.snakeBody[x].boardPos = this.snakeBody[x+1].boardPos
+		for(var x=(this.snakeBodyLength()-1); x>=1; x--){
+			this.snakeBody[x].boardPos = this.snakeBody[x-1].boardPos
 		}
-		this.snakeBody[ this.snakeBodyLength()-1 ].boardPos = this.snakeBody[ this.snakeBodyLength()-1 ].boardPos + this.headPosition
+		this.snakeBody[0].boardPos += this.headPosition
 	},

 	changeDirectionUp: function(){
  *made the snakeHead an object variable for easier access
    and as a small refactor.
  *generated logic to make snake return from the other side
    of the wall. Meaning, if the snake is going to hit the
    right wall, instead it will come from the left wall on
    the same row.
  *will implement the same logic for the other walls.
diff --git a/src/snakeJSModel.js b/src/snakeJSModel.js
index 2bec1d0..18a6f8b 100644
--- a/src/snakeJSModel.js
+++ b/src/snakeJSModel.js
@@ -3,8 +3,8 @@ function SnakeModel(){
 	this.snakeBody.push(new SnakeGrowth(2, 0))
 	this.snakeBody.push(new SnakeGrowth(1, 1))
 	this.snakeBody.push(new SnakeGrowth(0, 2))
-
 	this.headPosition = 1
+	this.snakeHead = this.snakeBody[0]
 }

 SnakeModel.prototype = {
@@ -24,11 +24,33 @@ SnakeModel.prototype = {
 		return arrayOfPositions
 	},

+//OSIUDFLIWJEF:LKJSDF:LKSJEGF
+//EPIPHANY
+//Since we keep a record of the direction of the snake
+//we can figure out when its going to hit a left or right
+//wall. For example, if the snake's next position would be 41,
+//and its head position is 1, that means it was moving to the right
+//and has hit a wall. In theory I could make the walls now be death
+//conditions. But I kind of think I want to leave them open and make
+//the snake return to the same row when it passes the wall.
+//For now I will just make the snake not die at wall hit.
 	moveSnake: function(){
 		for(var x=(this.snakeBodyLength()-1); x>=1; x--){
 			this.snakeBody[x].boardPos = this.snakeBody[x-1].boardPos
 		}
-		this.snakeBody[0].boardPos += this.headPosition
+			if(this.willHitRightWall()){
+				this.snakeHead.boardPos -= 19
+			}else{
+				this.snakeHead.boardPos += this.headPosition
+			}
+	},
+
+	willHitRightWall: function(){
+		if( ((this.snakeHead.boardPos + 2 ) %20 === 1) && (this.headPosition === 1) ){
+			return true
+		}else{
+			return false
+		}
 	},

 	changeDirectionUp: function(){
  *Added left wall logic. Snake will return to
    the right wall on the same row when it hits the
    left wall.
diff --git a/src/snakeJSModel.js b/src/snakeJSModel.js
index 18a6f8b..f616065 100644
--- a/src/snakeJSModel.js
+++ b/src/snakeJSModel.js
@@ -40,13 +40,24 @@ SnakeModel.prototype = {
 		}
 			if(this.willHitRightWall()){
 				this.snakeHead.boardPos -= 19
+			}else if(this.willHitLeftWall()){
+				this.snakeHead.boardPos += 19
 			}else{
 				this.snakeHead.boardPos += this.headPosition
 			}
 	},

+	willHitLeftWall: function(){
+		if( ( (this.snakeHead.boardPos - 1) %20 == 19) && (this.headPosition === -1) ){
+			return true
+		}else{
+			return false
+		}
+
+	},
+
 	willHitRightWall: function(){
-		if( ((this.snakeHead.boardPos + 2 ) %20 === 1) && (this.headPosition === 1) ){
+		if( ((this.snakeHead.boardPos + 1 ) %20 === 0) && (this.headPosition === 1) ){
 			return true
 		}else{
 			return false
  *wall hit logic for upper wall. Snake will come from
    the bottom in the same column now when hitting the
    upper wall.
diff --git a/src/snakeJS.js b/src/snakeJS.js
index e1241ee..275cb3e 100644
--- a/src/snakeJS.js
+++ b/src/snakeJS.js
@@ -59,7 +59,6 @@ SnakeGameController.prototype = {
 		window.addEventListener("keydown", this.changeSnakeDirection.bind(this), false)
 	},
 	changeSnakeDirection: function(event){
-		console.log(event.keyCode)
 		  switch (event.keyCode) {
 		  	case 37:
 		  		event.preventDefault()
diff --git a/src/snakeJSModel.js b/src/snakeJSModel.js
index f616065..e98ad8b 100644
--- a/src/snakeJSModel.js
+++ b/src/snakeJSModel.js
@@ -42,11 +42,21 @@ SnakeModel.prototype = {
 				this.snakeHead.boardPos -= 19
 			}else if(this.willHitLeftWall()){
 				this.snakeHead.boardPos += 19
+			}else if(this.willHitUpperWall()){
+				this.snakeHead.boardPos += 380
 			}else{
 				this.snakeHead.boardPos += this.headPosition
 			}
 	},

+	willHitUpperWall: function(){
+		if( ( (this.snakeHead.boardPos - 20) < 0) && (this.headPosition === -20)){
+			return true
+		}else{
+			return false
+		}
+	},
+
 	willHitLeftWall: function(){
 		if( ( (this.snakeHead.boardPos - 1) %20 == 19) && (this.headPosition === -1) ){
 			return true
  *added logic for hitting bottom wall. If the
    snake hits the bottom wall it will come from
    the top in the same column.
diff --git a/src/snakeJSModel.js b/src/snakeJSModel.js
index e98ad8b..b1b055c 100644
--- a/src/snakeJSModel.js
+++ b/src/snakeJSModel.js
@@ -44,11 +44,21 @@ SnakeModel.prototype = {
 				this.snakeHead.boardPos += 19
 			}else if(this.willHitUpperWall()){
 				this.snakeHead.boardPos += 380
+			}else if(this.willHitBottomWall()){
+				this.snakeHead.boardPos -=380
 			}else{
 				this.snakeHead.boardPos += this.headPosition
 			}
 	},

+	willHitBottomWall: function(){
+		if( ( (this.snakeHead.boardPos +20 ) > 399 ) && (this.headPosition === 20)){
+			return true
+		}else{
+			return false
+		}
+	},
+
 	willHitUpperWall: function(){
 		if( ( (this.snakeHead.boardPos - 20) < 0) && (this.headPosition === -20)){
 			return true
  *Created a method to create fluid movement when user hits
    a key. There is no longer a delay or confusion with key
    entries to move the snake. This has added a secondary
    effect of being able to speed up the snake. I think
    I kind of like it. It could be seen as a bug, however.
  *I also changed the way the growth appended to the snake. Before
    the growth was given a null position and waited for the move
    method to give it a value. I decided that forcing a value on it
    as it was appended worked better and improved the fluidity of
    the view.
  *cleaned up a comment.
diff --git a/src/snakeJS.js b/src/snakeJS.js
index 275cb3e..b33cd54 100644
--- a/src/snakeJS.js
+++ b/src/snakeJS.js
@@ -63,25 +63,36 @@ SnakeGameController.prototype = {
 		  	case 37:
 		  		event.preventDefault()
 		  		this.Model.changeDirectionLeft();
+		  		this.generateFluidMoves()
 		  	break;

 		  	case 38:
 		  		event.preventDefault()
 		  		this.Model.changeDirectionUp();
+		  		this.generateFluidMoves()
 		  	break;

 		  	case 39:
 		  		event.preventDefault()
 		  		this.Model.changeDirectionRight();
+		  		this.generateFluidMoves()
 		  	break;

 		  	case 40:
 		  		event.preventDefault()
 		  		this.Model.changeDirectionDown();
+		  		this.generateFluidMoves()
 		  	break;
 		  }

 	},
+
+	generateFluidMoves: function(){
+		clearInterval(this.conInterval)
+		this.executeTurn()
+		this.conInterval = setInterval(this.executeTurn.bind(this), 200)
+	},
+
 	startGame: function(){
 		this.conInterval = setInterval(this.executeTurn.bind(this), 200)
 	},
@@ -109,8 +120,6 @@ SnakeGameController.prototype = {
 	snakeHasEaten: function(){
 		this.setFood()
 		this.Model.growSnake();
-		this.Model.moveSnake();
-		this.fullViewRefresh();
 		this.playerScore +=1
 	},

diff --git a/src/snakeJSModel.js b/src/snakeJSModel.js
index b1b055c..41e43e4 100644
--- a/src/snakeJSModel.js
+++ b/src/snakeJSModel.js
@@ -13,7 +13,11 @@ SnakeModel.prototype = {
 	},

 	growSnake: function(){
-		this.snakeBody.push(new SnakeGrowth(null, this.snakeBodyLength()))
+		this.snakeBody.push(new SnakeGrowth(this.findLastPosition(), this.snakeBodyLength()))
+	},
+
+	findLastPosition: function(){
+		return this.snakeBody[(this.snakeBodyLength()-1)].boardPos
 	},

 	allSnakeBodyPositions: function(){
@@ -24,16 +28,6 @@ SnakeModel.prototype = {
 		return arrayOfPositions
 	},

-//OSIUDFLIWJEF:LKJSDF:LKSJEGF
-//EPIPHANY
-//Since we keep a record of the direction of the snake
-//we can figure out when its going to hit a left or right
-//wall. For example, if the snake's next position would be 41,
-//and its head position is 1, that means it was moving to the right
-//and has hit a wall. In theory I could make the walls now be death
-//conditions. But I kind of think I want to leave them open and make
-//the snake return to the same row when it passes the wall.
-//For now I will just make the snake not die at wall hit.
 	moveSnake: function(){
 		for(var x=(this.snakeBodyLength()-1); x>=1; x--){
 			this.snakeBody[x].boardPos = this.snakeBody[x-1].boardPos
  *refactoring and restructuring some naming conventions
  *Looked over code with Salar to consider some architecture
    ideas.
diff --git a/snakeJS.html b/snakeJS.html
index a6769ab..67ad164 100644
--- a/snakeJS.html
+++ b/snakeJS.html
@@ -3,7 +3,7 @@
 	<title>Ziad's Snake JS</title>
 	<link rel="stylesheet" href="css/snakeJSmain.css">
 	<script src="src/snakeJS.js"></script>
-	<script src="src/snakeJSView.js"></script>
+	<script src="src/canvas.js"></script>
 	<script src="src/snakeJSModel.js"></script>
 </head>
 <body>
diff --git a/src/canvas.js b/src/canvas.js
new file mode 100644
index 0000000..610496b
--- /dev/null
+++ b/src/canvas.js
@@ -0,0 +1,41 @@
+function Canvas(){
+	this.canvas = document.getElementsByClassName("snake-screen")[0]
+	this.ctx = this.canvas.getContext("2d")
+}
+
+Canvas.prototype = {
+
+	readyPlayScreen: function(){
+		this.ctx.fillStyle= "rgba(0,0,0,1)"
+		this.ctx.fillRect(0,0,500,500)
+	},
+
+	refreshScreen: function(){
+		this.ctx.fillStyle= "rgba(0,0,0,1)"
+		this.ctx.fillRect(0,0,500,500)
+	},
+
+	paintSnakeOnCanvas: function(growthPos){
+		this.ctx.fillStyle= "rgba(255,255,255,1)"
+		this.ctx.fillRect( this.findXAxis( growthPos ), this.findYAxis( growthPos ), 25, 25 )
+	},
+
+	paintFoodOnCanvas: function(foodPos){
+		this.ctx.fillStyle= "rgba(255,0,0,1)"
+		this.ctx.fillRect( this.findXAxis( foodPos ), this.findYAxis( foodPos), 25, 25 )
+	},
+
+	findXAxis: function(growthPos){
+		return ( growthPos%20 )*25
+	},
+
+	findYAxis: function(growthPos){
+		return Math.floor(growthPos/20) * 25
+	},
+
+	updateSnakeScreen: function(arrayOfPositions){
+		for( var x = ( arrayOfPositions.length - 1 ); x >= 0; x-- ){
+			this.paintSnakeOnCanvas( arrayOfPositions[x] )
+		}
+	}
+}
\ No newline at end of file
diff --git a/src/snakeJS.js b/src/snakeJS.js
index b33cd54..431acc7 100644
--- a/src/snakeJS.js
+++ b/src/snakeJS.js
@@ -9,7 +9,7 @@ window.addEventListener( 'load', function(){

 function SnakeGameController(){
-	this.View = new SnakeView();
+	this.View = new Canvas();
 	this.Model = new SnakeModel();
 	this.conInterval = setInterval();
 	this.snakeGameBoard = [];
@@ -61,32 +61,30 @@ SnakeGameController.prototype = {
 	changeSnakeDirection: function(event){
 		  switch (event.keyCode) {
 		  	case 37:
-		  		event.preventDefault()
-		  		this.Model.changeDirectionLeft();
-		  		this.generateFluidMoves()
+		  		this.changeDirection( event, this.Model.changeDirectionLeft )
 		  	break;

 		  	case 38:
-		  		event.preventDefault()
-		  		this.Model.changeDirectionUp();
-		  		this.generateFluidMoves()
+		  		this.changeDirection( event, this.Model.changeDirectionUp )
 		  	break;

 		  	case 39:
-		  		event.preventDefault()
-		  		this.Model.changeDirectionRight();
-		  		this.generateFluidMoves()
+		  		this.changeDirection( event, this.Model.changeDirectionRight )
 		  	break;

 		  	case 40:
-		  		event.preventDefault()
-		  		this.Model.changeDirectionDown();
-		  		this.generateFluidMoves()
+		  		this.changeDirection( event, this.Model.changeDirectionDown )
 		  	break;
 		  }

 	},

+	changeDirection: function( e, direction ){
+		e.preventDefault()
+		direction.call( this.Model )
+		this.generateFluidMoves()
+	},
+
 	generateFluidMoves: function(){
 		clearInterval(this.conInterval)
 		this.executeTurn()
diff --git a/src/snakeJSModel.js b/src/snakeJSModel.js
index 41e43e4..5fc9444 100644
--- a/src/snakeJSModel.js
+++ b/src/snakeJSModel.js
@@ -1,8 +1,13 @@
+//custom events
+//jquery trigger
+
 function SnakeModel(){
 	this.snakeBody = []
-	this.snakeBody.push(new SnakeGrowth(2, 0))
-	this.snakeBody.push(new SnakeGrowth(1, 1))
-	this.snakeBody.push(new SnakeGrowth(0, 2))
+	//initialize?
+	this.snakeBody.push(new SnakeNode(2, 0))
+	this.snakeBody.push(new SnakeNode(1, 1))
+	this.snakeBody.push(new SnakeNode(0, 2))
+	//direction
 	this.headPosition = 1
 	this.snakeHead = this.snakeBody[0]
 }
@@ -13,7 +18,7 @@ SnakeModel.prototype = {
 	},

 	growSnake: function(){
-		this.snakeBody.push(new SnakeGrowth(this.findLastPosition(), this.snakeBodyLength()))
+		this.snakeBody.push(new SnakeNode(this.findLastPosition(), this.snakeBodyLength()))
 	},

 	findLastPosition: function(){
@@ -105,7 +110,7 @@ SnakeModel.prototype = {
 }

-function SnakeGrowth(boardPos, snakePart){
+function SnakeNode(boardPos, snakePart){
 	this.boardPos = boardPos
 	this.snakePart = snakePart
 }
\ No newline at end of file
diff --git a/src/snakeJSView.js b/src/snakeJSView.js
deleted file mode 100644
index 758dfbf..0000000
--- a/src/snakeJSView.js
+++ /dev/null
@@ -1,41 +0,0 @@
-function SnakeView(){
-	this.SnakeCanvas = document.getElementsByClassName("snake-screen")[0]
-	this.canvasContext = this.SnakeCanvas.getContext("2d")
-}
-
-SnakeView.prototype = {
-
-	readyPlayScreen: function(){
-		this.canvasContext.fillStyle= "rgba(0,0,0,1)"
-		this.canvasContext.fillRect(0,0,500,500)
-	},
-
-	refreshScreen: function(){
-		this.canvasContext.fillStyle= "rgba(0,0,0,1)"
-		this.canvasContext.fillRect(0,0,500,500)
-	},
-
-	paintSnakeOnCanvas: function(growthPos){
-		this.canvasContext.fillStyle= "rgba(255,255,255,1)"
-		this.canvasContext.fillRect( this.findXAxis( growthPos ), this.findYAxis( growthPos ), 25, 25 )
-	},
-
-	paintFoodOnCanvas: function(foodPos){
-		this.canvasContext.fillStyle= "rgba(255,0,0,1)"
-		this.canvasContext.fillRect( this.findXAxis( foodPos ), this.findYAxis( foodPos), 25, 25 )
-	},
-
-	findXAxis: function(growthPos){
-		return ( growthPos%20 )*25
-	},
-
-	findYAxis: function(growthPos){
-		return Math.floor(growthPos/20) * 25
-	},
-
-	updateSnakeScreen: function(arrayOfPositions){
-		for(var x=(arrayOfPositions.length-1); x>=0; x--){
-			this.paintSnakeOnCanvas(arrayOfPositions[x])
-		}
-	}
-}
\ No newline at end of file
Merge pull request #1 from Souldjinn/dbc_work

This was the most updated and working branch, merging it in because I'm working on this project loner-status.