A demonstration of Conway's Game of Life derived from my cs course assignment.
I did not design the GUI. I just implemented the logic.
Watch the awesomeness unfold upon you.
Music licensed under creative commons attribution.
Music information: Vsadnik - I Can Fly - from - Tunguska Chillout Grooves vol. 1 by Tunguska Electronic Music Society
Can be found here: http://www.jamendo.com/en/album/35205
More info here:: http://creativecommons.org/licenses/by/3.0/
how long did it take you.
101LiquidNitrogen 1 month ago
thx a lot for the tips =D
zengrz 1 year ago
An analogous strategy applies to corner pixels, but in this case you must place three copies of the screen so that they surround the corner pixel in question.
I guess a couple of pictures would be more helpful.
cwldoc 1 year ago
How do we modify the algorithm of the game of life to make it a torus?
For pixels that are not on the edges or corners, the algorithm for calculating the number of adjacent pixels (that are turned on) is unchanged.
For pixels on one of the edges, make a mental copy of the entire screen and lay it next to the edge on which the pixel in question lies - then you can count the number of (turned-on) pixels that are in contact with the pixel in question.
cwldoc 1 year ago
I'm assuming you are asking how to write a program that uses a "torus" universe (instead of one that uses a finite rectangle, with outside pixels turned off).
A torus ("surface of a doughnut") is obtained by starting with a rectangle, then pasting together the top and bottom edges and the left and right edges.
cwldoc 1 year ago
sry but i am nt sure what u mean...
when i have a cell moving out from left edge, how does the board on the left side of the original board is going to help me move the cell to the right of the original cell with the help of the board at the right?
zengrz 1 year ago
Just imagine 8 copies of the above screen laid around the edges of itself; that is, the left edge is identified with the right edge, the top edge is identified with the bottom edge, the right upper corner is identivied with the lower left corner, etc.
I tried to post a section of my (C) program here, but the minimum amount necessary (to make any sense) is about 2800 charaters long, which exceeds the allowed comment length.
cwldoc 1 year ago
hi can u explain how u implement the torus to bypass the boundary check pls? thanks a ton
zengrz 2 years ago