Mercurial > hg > Members > nobuyasu > Alice > DPPAlice
changeset 17:92cde6277018
modified each CodeSegment linkage
author | one |
---|---|
date | Sun, 09 Dec 2012 22:37:44 +0900 |
parents | f5c2fad58b7e |
children | f0a2e2d2094e |
files | src/alice/test/dpp/codesegment/EatCodeSegment.java src/alice/test/dpp/codesegment/PutForkCodeSegment.java src/alice/test/dpp/codesegment/TakeLeftForkCodeSegment.java src/alice/test/dpp/codesegment/ThinkCodeSegment.java |
diffstat | 4 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/alice/test/dpp/codesegment/EatCodeSegment.java Sun Dec 09 22:29:59 2012 +0900 +++ b/src/alice/test/dpp/codesegment/EatCodeSegment.java Sun Dec 09 22:37:44 2012 +0900 @@ -18,7 +18,7 @@ Philosophy phil = arg1.asClass(Philosophy.class); System.out.println(phil.getName() + " is eating."); phil.setState(Philosophy.State.PUTFORK); - new ScheduleCodeSegment(phil.getName()); + new PutForkCodeSegment(phil.getName(), phil.getRightFork(), phil.getLeftFork()); ods.update("local", phil.getName(), phil); } }
--- a/src/alice/test/dpp/codesegment/PutForkCodeSegment.java Sun Dec 09 22:29:59 2012 +0900 +++ b/src/alice/test/dpp/codesegment/PutForkCodeSegment.java Sun Dec 09 22:37:44 2012 +0900 @@ -27,7 +27,7 @@ leftFork.onTheTable(phil.getName()); rightFork.onTheTable(phil.getName()); phil.setState(Philosophy.State.THINK); - new ScheduleCodeSegment(phil.getName()); + new ThinkCodeSegment(phil.getName()); ods.update("local", phil.getName(), phil); ods.update("local", leftFork.getForkName(), leftFork); ods.update("local", rightFork.getForkName(), rightFork);
--- a/src/alice/test/dpp/codesegment/TakeLeftForkCodeSegment.java Sun Dec 09 22:29:59 2012 +0900 +++ b/src/alice/test/dpp/codesegment/TakeLeftForkCodeSegment.java Sun Dec 09 22:37:44 2012 +0900 @@ -24,7 +24,7 @@ phil.setState(Philosophy.State.EAT); new EatCodeSegment(phil.getName()); } else { - new TakeLeftForkCodeSegment(phil.getName(), phil.getRightFork()); + new TakeLeftForkCodeSegment(phil.getName(), phil.getLeftFork()); } ods.update("local", phil.getName(), phil); ods.update("local", fork.getForkName(), fork);
--- a/src/alice/test/dpp/codesegment/ThinkCodeSegment.java Sun Dec 09 22:29:59 2012 +0900 +++ b/src/alice/test/dpp/codesegment/ThinkCodeSegment.java Sun Dec 09 22:37:44 2012 +0900 @@ -19,7 +19,7 @@ System.out.println(phil.getName() + " is thinking"); // phil.setState(Philosophy.State.TAKEFORK); // dead lock phil.setState(Philosophy.State.TAKERIGHTFORK); - new ScheduleCodeSegment(phil.getName()); + new TakeRightForkCodeSegment(phil.getName(), phil.getRightFork()); ods.update("local", phil.getName(), phil); }