-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add Game of Life Demo #7
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work on the demo! 👏🏻
I have found a few minor problems which I hope you can address, otherwise I'd be happy to merge this.
Thank you!
- only use local variables - no time management for simplier code
|
0d1e844
to
ee71039
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the changes! Looking great already!
There is one minor little change I would like you to do before I merge this.
I think I have caused a little bit of confusion with the "everything should be local
" quote. In Lua, local
variables work pretty much the same way that global ones do except that you can't use them when you require()
a file. What I'm trying to say is that you don't have to pass the neighbours
variable into the count_alive_neighbours
function as an argument. Instead, you can just define the neighbours
variable above the count_alive_neighbours
function and then reference it in the function body and remove the neighbours
argument from the function.
e4646d3
to
fa45f28
Compare
55c86b1
to
2ac71cb
Compare
So I removed the argument neighbourgs of the function count_alive_neighbours. I did it because of the habit of making code more generic but here it has no use for simple demos. |
Perfect! Thank you for your work! 🔥 I will merge this and also release v1.0.0 soon, since I'm pretty happy about the state of the library and feel like it's pretty much ready. |
No description provided.