Observer logs stats for each run.
[cellular-automata.git] / 001 / src / life_time.erl
index f009b11..089925f 100644 (file)
@@ -121,6 +121,8 @@ handle_cast({report_state, {CellID, GenID, CellState}},
             ),
             StateChars = [state_to_char(S) || {_, S} <- SortedStatePairs],
 
+            ok = life_observer:log_generation(GenID, NewNDead, NewNAlive),
+
             ok = io:format(
                 "X: ~b Y: ~b CELLS: ~b DEAD: ~b ALIVE: ~b GENERATION: ~b~n",
                 [X, Y, NumCells, NewNDead, NewNAlive, GenID]
This page took 0.017583 seconds and 4 git commands to generate.