The goal of this project is to implement Wolfram’s elementary cellular automaton in the terminal.
We had to implement rules 30, 90 and 110.
But it was easier to implement all rules with a generic method.
To install stack please refer to the installation guide
Linux:
make
./wolfram --rule R [ [--start S][--lines L][--window W][--move M] ]
- --rule : the ruleset to use (no default value, mandatory)
- --start : the generation number at which to start the display. The default value is 0.
- --lines : the number of lines to display. When omitted, the program never stops.
- --window : the number of cells to display on each line (line width). If even, the central cell is displayed in the next cell on the right. The default value is 80.
- --move : a translation to apply on the window. If negative, the window is translated to the left. If positive, it’s translated to the right.
Rules 0 to 255.
cd bonus
make
./wolfram --rule R [ [--start S][--lines L][--window W][--move M] ]