Fix: sending the current, not next, state back to time.
authorSiraaj Khandkar <siraaj@khandkar.net>
Sat, 21 Jul 2012 16:38:37 +0000 (12:38 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Sat, 21 Jul 2012 16:38:37 +0000 (12:38 -0400)
001/life.erl

index 9c84bd8..31113cb 100644 (file)
@@ -121,7 +121,7 @@ cell(MyID, MyParent, MyNeighbors, MyState) ->
 cell(MyID, MyParent, MyNeighbors, MyState, {[], States}) ->
     LiveNeighbors = lists:sum(States),
     MyNewState = new_state(MyState, LiveNeighbors),
-    MyParent ! {tock, {MyID, MyNewState}},
+    MyParent ! {tock, {MyID, MyState}},
     cell(MyID, MyParent, MyNeighbors, MyNewState);
 
 % Awaiting requests and replies
This page took 0.027758 seconds and 4 git commands to generate.