fp-games
fp-games copied to clipboard
Functional JavasScript implementation of Snake for the web and terminal.
If I’m on a cell A going to cell B. While still on A I press UP the snake doesn’t go UP form A it goes to B first then...
The apple position can stand on a snake position. `const nextApple = state => willEat(state) ? validApplePos(state)(rndPos(state)) : state.apple` `const validApplePos = (state) => (randPos) => state.snake.find( pointEq(randPos) ) ===...
Implemented the discussion in issue https://github.com/chrokh/fp-games/issues/3
Problems: 1. When moving right, and press down and left rapidly (within the same draw), the left will be rejected because it fails the check against the first item in...
Solves issue #7 Please review
Submit a PULL Request to the owner of the repo
add setting menu to set key functions or time response