From: adam Date: Thu, 15 Feb 2007 09:58:14 +0000 (+0100) Subject: add Instruction.isStanding() X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=589882cc55b27c2eb4f67b8d785731c7a73f25a7;p=fleet.git add Instruction.isStanding() --- diff --git a/src/edu/berkeley/fleet/api/Instruction.java b/src/edu/berkeley/fleet/api/Instruction.java index 789aff3..ceaf209 100644 --- a/src/edu/berkeley/fleet/api/Instruction.java +++ b/src/edu/berkeley/fleet/api/Instruction.java @@ -47,6 +47,10 @@ public abstract class Instruction { throw new RuntimeException("count field of an instruction must be >=0"); } + public boolean isStanding() { + return count==0; + } + public Instruction.Executable decrementCount() { if (count==1) return null; return new Executable(benkoBox, dest, count==0 ? 0 : count-1,