fp-games icon indicating copy to clipboard operation
fp-games copied to clipboard

Apple position

Open som911 opened this issue 4 years ago • 3 comments

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) ) === undefined ? randPos : validApplePos(state)(rndPos(state))

som911 avatar Feb 15 '21 20:02 som911

Hey @som911 I would love to contribute in this issue Please elaborate which file needs this change

maddy020 avatar Jan 11 '23 11:01 maddy020

Thank you very much @som911 and @maddy020. I very much appreciate your time and enthusiasm <3

Since this is a repo that's connected to a YouTube video I think it makes sense to leave the code as it was originally written.

Hope you understand :)

chrokh avatar Jan 11 '23 12:01 chrokh

Wait, I forgot that I had already merged a PR and promised to merge another. I'll reopen and merge your PR :) Thank you for your time :)

chrokh avatar Jan 11 '23 12:01 chrokh