From: Siraaj Khandkar Date: Mon, 23 Jul 2012 15:18:56 +0000 (-0400) Subject: Updated references from old to new module names. X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=982ec72043e6de6b6b22e49acb3fe13f1f54bc93;p=cellular-automata.git Updated references from old to new module names. --- diff --git a/001/src/life.erl b/001/src/life.erl index c59b98b..e40d841 100644 --- a/001/src/life.erl +++ b/001/src/life.erl @@ -28,7 +28,7 @@ start(_StartType, _StartArgs) -> {ok, X} = application:get_env(?MODULE, x), {ok, Y} = application:get_env(?MODULE, y), CellData = cell_data(X, Y), - god:start_link(X, CellData). + life_god:start_link(X, CellData). stop(_State) -> diff --git a/001/src/life_cell.erl b/001/src/life_cell.erl index 227f673..6f477cf 100644 --- a/001/src/life_cell.erl +++ b/001/src/life_cell.erl @@ -1,4 +1,4 @@ --module(cell). +-module(life_cell). -behaviour(gen_server). @@ -95,7 +95,7 @@ handle_cast({response_state, NeighborState}, case NewPending of 0 -> NewCellState = new_state(CellState, NewLiveNeighbors), - ok = time:tock(ID, NewCellState), + ok = life_time:tock(ID, NewCellState), {noreply, NewState#state{live_neighbors=0 ,cell_state=NewCellState diff --git a/001/src/life_god.erl b/001/src/life_god.erl index 3922680..d9f6237 100644 --- a/001/src/life_god.erl +++ b/001/src/life_god.erl @@ -1,4 +1,4 @@ --module(god). +-module(life_god). -behaviour(supervisor). @@ -29,13 +29,13 @@ init([X, CellData]) -> CellNames = [Name || {_, Name, _} <- CellData], RestartStrategy = {one_for_one, 5, 10}, Cells = [spec_cell(Datum) || Datum <- CellData], - Time = ?CHILD(worker, time, [X, CellNames]), + Time = ?CHILD(worker, life_time, [X, CellNames]), Children = Cells ++ [Time], {ok, {RestartStrategy, Children}}. spec_cell({_, Name, _}=Datum) -> - M = cell, + M = life_cell, F = start_link, A = [Datum], {Name, {M, F, A}, permanent, 5000, worker, [M]}. diff --git a/001/src/life_time.erl b/001/src/life_time.erl index 02cd61e..b832043 100644 --- a/001/src/life_time.erl +++ b/001/src/life_time.erl @@ -1,4 +1,4 @@ --module(time). +-module(life_time). -behaviour(gen_server).