Just for Fun. John Conway's Game of Life
Here you have a link to the class that simulate the Game of Life (OPNLib.Game.ConwayLifeGame). Just load, compile it and execute the Test() method from your terminal and you'll see how a world full of life arises and evolves in front of your eyes. Internally it creates a matrix using globals, where each node of level 1 is a row in which we'll have a bit string as long as the columns of the matrix we want to represent. Each bit will be the value of the cell: alive (1), dead (0)… but you have more details in the doc and the class itself in GitHub.
First of all, change your terminal settings to allow more columns (~132 or more) and rows (~48 or more).
If you want to set different initial settings you can do it. Just call the test method passing a JSON object as a parameter. Within the class you'll find more information, but for example, you could do:
And then, you can play with InitialConfig, changing its value from 1 to 5, to change the initial state of the universe….
There is additional doc about this class in GitHub.