From 01136c6796e21f023713e026674576d8e623462d Mon Sep 17 00:00:00 2001 From: EVE Date: Mon, 13 Mar 2017 16:41:45 -0400 Subject: Formatting --- .../src/bjc/dicelang/dice/CompoundingDie.java | 26 +++++++++++++--------- 1 file changed, 16 insertions(+), 10 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 3291b52..28badf4 100644 --- a/dice-lang/src/bjc/dicelang/dice/CompoundingDie.java +++ b/dice-lang/src/bjc/dicelang/dice/CompoundingDie.java @@ -14,13 +14,15 @@ public class CompoundingDie implements Die { private Die source; private Predicate compoundOn; - private String compoundPattern; + private String compoundPattern; /** * Create a new compounding die with no pattern. * - * @param src The die to compound from - * @param compound The conditions to compound on + * @param src + * The die to compound from + * @param compound + * The conditions to compound on */ public CompoundingDie(Die src, Predicate compound) { this(src, compound, null); @@ -29,14 +31,18 @@ public class CompoundingDie implements Die { /** * Create a new compounding die with a specified pattern. * - * @param src The die to compound from - * @param compound The conditions to compound on - * @param patt The string pattern the condition came from, for printing + * @param src + * The die to compound from + * @param compound + * The conditions to compound on + * @param patt + * The string pattern the condition came from, for + * printing */ public CompoundingDie(Die src, Predicate compound, String patt) { source = src; - compoundOn = compound; + compoundOn = compound; compoundPattern = patt; } @@ -55,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; @@ -72,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; @@ -83,7 +89,7 @@ public class CompoundingDie implements Die { @Override public String toString() { - if(compoundPattern == null) { + if (compoundPattern == null) { return source + "!!"; } else { return source + "!!" + compoundPattern; -- cgit v1.2.3