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

Create button for Starting the Game #6

Open
ashack28 opened this issue Apr 15, 2021 · 1 comment
Open

Create button for Starting the Game #6

ashack28 opened this issue Apr 15, 2021 · 1 comment

Comments

@ashack28
Copy link
Collaborator

No description provided.

@luckyphan
Copy link
Collaborator

onclick it begins to iterate through each
if (current block dead/inactive && has 3 live cells as neighbors)-->will be live next gen
if(current block is live && has more than 3 or less than 2 live neigbors)-->will be dead/inactive next gen
3.stays the same next gen

how to count neighbors
left(column-1),top(row-1),bottom, right(column+1),topleft(column-1&row-1),topright(column+1&row-1),bottomleft(column-1&row+1),bottomright(column+1&row+1)

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

2 participants