add Instruction.isStanding()
authoradam <adam@megacz.com>
Thu, 15 Feb 2007 09:58:14 +0000 (10:58 +0100)
committeradam <adam@megacz.com>
Thu, 15 Feb 2007 09:58:14 +0000 (10:58 +0100)
src/edu/berkeley/fleet/api/Instruction.java

index 789aff3..ceaf209 100644 (file)
@@ -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,