Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apple position #7

Open
som911 opened this issue Feb 15, 2021 · 3 comments
Open

Apple position #7

som911 opened this issue Feb 15, 2021 · 3 comments

Comments

@som911
Copy link

som911 commented Feb 15, 2021

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))

@maddy020
Copy link

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

@chrokh
Copy link
Owner

chrokh commented Jan 11, 2023

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 chrokh closed this as completed Jan 11, 2023
@chrokh
Copy link
Owner

chrokh commented Jan 11, 2023

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 chrokh reopened this Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants