From: Siraaj Khandkar Date: Sat, 21 Jul 2012 16:38:37 +0000 (-0400) Subject: Fix: sending the current, not next, state back to time. X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=0ede9127b49d5e0d13d043742cdabc7326362410;p=cellular-automata.git Fix: sending the current, not next, state back to time. --- diff --git a/001/life.erl b/001/life.erl index 9c84bd8..31113cb 100644 --- a/001/life.erl +++ b/001/life.erl @@ -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