From 0ede9127b49d5e0d13d043742cdabc7326362410 Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Sat, 21 Jul 2012 12:38:37 -0400 Subject: [PATCH] Fix: sending the current, not next, state back to time. --- 001/life.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.20.1