Mercurial > hg > Members > nobuyasu > Alice > DPPAlice
changeset 13:888388e47fe5
modified ThinkCodeSegment. remove random, sleep
author | one |
---|---|
date | Wed, 28 Nov 2012 16:21:34 +0900 |
parents | bfaaebb50a2e |
children | 33727db069c2 |
files | src/alice/test/dpp/codesegment/ThinkCodeSegment.java |
diffstat | 1 files changed, 1 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/src/alice/test/dpp/codesegment/ThinkCodeSegment.java Sun Nov 25 18:49:29 2012 +0900 +++ b/src/alice/test/dpp/codesegment/ThinkCodeSegment.java Wed Nov 28 16:21:34 2012 +0900 @@ -23,18 +23,7 @@ System.out.println(phil.getName() + " thinking"); Fork leftFork = arg1.asClass(Fork.class); Fork rightFork = arg2.asClass(Fork.class); - double rand = Math.random(); - if (rand < 0.5) { - try { - Thread.sleep(10); - new ThinkCodeSegment(phil); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } else { - new TakeForkCodeSegment(phil); - } - + new TakeForkCodeSegment(phil); ods.update("local", leftFork.getForkName(), leftFork); ods.update("local", rightFork.getForkName(), rightFork); }