Skip to content
Snippets Groups Projects
Commit d48d16b6 authored by Jake Dreher's avatar Jake Dreher
Browse files

Add food functions

parent da413344
Branches
No related tags found
1 merge request!8game.js update (addFood & moveOneStep)
......@@ -15,6 +15,15 @@ module.exports = {
}
gameBoard.push(row);
}
for (var i = 0; i < 10; i++) {
gameBoard = addFood(gameBoard);
}
return gameBoard;
},
addFood: (gameBoard) => {
// select a random cell that is empty
// set the cell to FOOD
return gameBoard;
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment