Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit/AppGameKit Studio Showcase / [Code] Conway's Game of Life

Author
Message
swissolo
14
Years of Service
User Offline
Joined: 9th Jan 2010
Location:
Posted: 23rd Jan 2015 22:19 Edited at: 23rd Jan 2015 22:20

I had a slice of time so I wrote this in an hour and a half. I was using an old version of AppGameKit that initially led to some issues (wasn't on my normal computer) but I'm happy with the way it turned out It's not truly very complex. The bulk of the code is the choice between a wrapping world or a bounded one. Feel free to play with the board size and the tick delay (A cap on the speed. A tick delay of 0 will run at full speed). If you prefer you can remove the drawGrid() line

As a side note, apparently drawLine and drawBox work slightly differently with regard to their left most edge. I didn't have to add a 1 to the drawBox x1 coordinate where I expected to. Perhaps the left most side is unintentionally exclusive?

Attachments

Login to view attachments
swissolo
14
Years of Service
User Offline
Joined: 9th Jan 2010
Location:
Posted: 25th Jan 2015 21:06
Here's a bonus command

Just remember not to fill the whole map beforehand

Login to post a reply

Server time is: 2024-11-22 04:49:43
Your offset time is: 2024-11-22 04:49:43