SFML community forums
General => SFML projects => Topic started by: Haikarainen on August 04, 2011, 12:56:03 pm
-
Hey fellas, Was bored yesterday and couldn't sleep so I created a "Game of Life" http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life
Win32 Binaries and source:
https://legacy.sfmluploads.org/file/42
Press space to play/pause simulation, feel free to optimize the code but please note me if you do so :)
Rar contains:
Win32-executable
Pre-compiled unstable SFML2-libraries
Source.rar wich contains the source, icon and codeblocksproject.EDIT: Fancier link, updated sfmluploads :D
-
It may be less coherent but it would suffice using a Boolean directly instead of the LifeState object.
-
It may be less coherent but it would suffice using a Boolean directly instead of the LifeState object.
Lol yes that is very true :D When i made it i was thinking of implementing colours and my own testing sandbox, therefore i created the class.
-
Nice, I recently found Game of Life for the first time and thought I would try to make it.
However i used hexagons instead (took rather long time for me to get those damn shapes working) :?
Thought i could share it here alongside yours if anyone is interested :)
https://legacy.sfmluploads.org/file/46
Not very nice code but I didn't plan on sharing this when I wrote it :P
-
Nice, I recently found Game of Life for the first time and thought I would try to make it.
However i used hexagons instead (took rather long time for me to get those damn shapes working) :?
Thought i could share it here alongside yours if anyone is interested :)
https://legacy.sfmluploads.org/file/46
Not very nice code but I didn't plan on sharing this when I wrote it :P
That is really cool :D What rules do you use? 2 or 3 lives on?
-
I first tried using both 2 and 3 i believe, but it was rather dull results...
When i googled hexlife i found this and applied the same rules as he used, got much more interesting then.
http://www.well.com/~dgb/hexlife.html