Add solutions for part 1

This commit is contained in:
2020-11-15 13:57:48 -05:00
parent e4f9fd2682
commit 742db6d102
479 changed files with 202980 additions and 13 deletions

View File

@@ -0,0 +1,32 @@
/** Implements a cellular automaton.
*
* In the first state the user can define the initial configuration (the cells
* that are alive in the beginning. If the user is not sure about which cells
* to enable choosing the one in the middle (255/256) is ususually a good
* start.
*
* Next, the user selects the rule they want to simulate. A list of all rules
* is available on Wikipedia. If the user is not sure which rule they want Rule
* 90 is a good start to get the idea.
*
* https://en.wikipedia.org/wiki/Elementary_cellular_automaton
*
* In the second stage the user can select the initial configuration of the
* automaton. The keys 'h' and 'l' move the cursor one pixel to the left or
* right respectively. By pressing the space bar the user can toggle the
* current pixel. By pressing the 'r' key the simulation is started. Pressing
* 'q' ends the simulator.
*/
/** Initializes a new Cellular Automaton Game and runs it. */
class Main {
function void main() {
var CellularAutomatonController controller;
let controller = CellularAutomatonController.new();
do controller.initialConfiguration();
do controller.run();
do controller.dispose();
return;
}
}