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/v1/CompoundDice.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'dice-lang/src/bjc/dicelang/v1/CompoundDice.java') diff --git a/dice-lang/src/bjc/dicelang/v1/CompoundDice.java b/dice-lang/src/bjc/dicelang/v1/CompoundDice.java index a70ae39..43d64e8 100644 --- a/dice-lang/src/bjc/dicelang/v1/CompoundDice.java +++ b/dice-lang/src/bjc/dicelang/v1/CompoundDice.java @@ -2,10 +2,10 @@ package bjc.dicelang.v1; /** * Implements a "compound dice" - * + * * To explain, a compound dice is something like a d100 composed from two d10s * instead of a hundred sided die. - * + * * @author ben * */ @@ -22,7 +22,7 @@ public class CompoundDice implements IDiceExpression { /** * Create a new compound dice using the specified dice - * + * * @param lft * The die to use on the left * @param rght @@ -35,7 +35,7 @@ public class CompoundDice implements IDiceExpression { /** * Create a new compound dice from two dice strings - * + * * @param lft * The left side dice as a string * @param rght @@ -47,7 +47,7 @@ public class CompoundDice implements IDiceExpression { /** * Create a new compound dice from an array of dice strings - * + * * @param exps * An array of two dice strings */ @@ -62,10 +62,8 @@ public class CompoundDice implements IDiceExpression { @Override public int optimize() { - if (!canOptimize()) { - throw new UnsupportedOperationException("Cannot optimize this compound dice. " - + "Both component dice must be optimizable" + " to optimize a compound dice"); - } + if(!canOptimize()) throw new UnsupportedOperationException("Cannot optimize this compound dice. " + + "Both component dice must be optimizable" + " to optimize a compound dice"); return Integer.parseInt(left.optimize() + "" + right.optimize()); } -- cgit v1.2.3