From 635d3150e3e85c01b777ff165e21fa8965d58440 Mon Sep 17 00:00:00 2001 From: EVE Date: Tue, 14 Mar 2017 12:08:11 -0400 Subject: Cleanup --- dice-lang/src/bjc/dicelang/dice/CompoundingDie.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'dice-lang/src/bjc/dicelang/dice/CompoundingDie.java') diff --git a/dice-lang/src/bjc/dicelang/dice/CompoundingDie.java b/dice-lang/src/bjc/dicelang/dice/CompoundingDie.java index 28badf4..a25696a 100644 --- a/dice-lang/src/bjc/dicelang/dice/CompoundingDie.java +++ b/dice-lang/src/bjc/dicelang/dice/CompoundingDie.java @@ -13,8 +13,8 @@ import java.util.function.Predicate; public class CompoundingDie implements Die { private Die source; - private Predicate compoundOn; - private String compoundPattern; + private Predicate compoundOn; + private String compoundPattern; /** * Create a new compounding die with no pattern. @@ -61,7 +61,7 @@ public class CompoundingDie implements Die { long res = source.roll(); long oldRes = res; - while (compoundOn.test(oldRes)) { + while(compoundOn.test(oldRes)) { oldRes = source.rollSingle(); res += oldRes; @@ -78,7 +78,7 @@ public class CompoundingDie implements Die { long res = source.rollSingle(); long oldRes = res; - while (compoundOn.test(oldRes)) { + while(compoundOn.test(oldRes)) { oldRes = source.rollSingle(); res += oldRes; @@ -89,10 +89,9 @@ public class CompoundingDie implements Die { @Override public String toString() { - if (compoundPattern == null) { + if(compoundPattern == null) return source + "!!"; - } else { + else return source + "!!" + compoundPattern; - } } } -- cgit v1.2.3