Mercurial > hg > Members > nobuyasu > Alice > DPPAlice
diff src/alice/test/dpp/codesegment/philosophy/StartCodeSegment.java @ 23:da62aa1f4d87
hg rename codesegment package
author | one |
---|---|
date | Mon, 10 Dec 2012 00:22:41 +0900 |
parents | src/alice/test/dpp/codesegment/StartCodeSegment.java@6018e62cb198 |
children | f77f0bb99f35 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/alice/test/dpp/codesegment/philosophy/StartCodeSegment.java Mon Dec 10 00:22:41 2012 +0900 @@ -0,0 +1,26 @@ +package alice.test.dpp.codesegment.philosophy; + +import alice.codesegment.CodeSegment; +import alice.test.dpp.datasegment.Fork; +import alice.test.dpp.datasegment.Philosophy; + +public class StartCodeSegment extends CodeSegment { + + @Override + public void run() { + System.out.println("run StartCodeSegment"); + + new ScheduleCodeSegment("phil1"); + new ScheduleCodeSegment("phil2"); + new ScheduleCodeSegment("phil3"); + + ods.update("local", "phil1", new Philosophy("phil1","fork1","fork2")); + ods.update("local", "phil2", new Philosophy("phil2","fork2","fork3")); + ods.update("local", "phil3", new Philosophy("phil3","fork3","fork1")); + ods.update("local", "fork1", new Fork("fork1")); + ods.update("local", "fork2", new Fork("fork2")); + ods.update("local", "fork3", new Fork("fork3")); + + } + +}