diff options
| author | EVE <EVE@EVE-PC> | 2017-03-14 12:08:11 -0400 |
|---|---|---|
| committer | EVE <EVE@EVE-PC> | 2017-03-14 12:08:11 -0400 |
| commit | 635d3150e3e85c01b777ff165e21fa8965d58440 (patch) | |
| tree | 3389128f83a5a79f8d0eec0a0e19f54b9d117b66 /dice-lang/src/bjc/dicelang/dice/CompoundingDie.java | |
| parent | e59e2a97773f93bdd25bd4680809c10699f0feb3 (diff) | |
Cleanup
Diffstat (limited to 'dice-lang/src/bjc/dicelang/dice/CompoundingDie.java')
| -rw-r--r-- | dice-lang/src/bjc/dicelang/dice/CompoundingDie.java | 13 |
1 files changed, 6 insertions, 7 deletions
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<Long> compoundOn;
- private String compoundPattern;
+ private Predicate<Long> 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;
- }
}
}
|
