diff --git a/bin/domain/Box.class b/bin/domain/Box.class index 142c7d1..36c4a5b 100644 Binary files a/bin/domain/Box.class and b/bin/domain/Box.class differ diff --git a/src/domain/Box.java b/src/domain/Box.java index 5bde51c..77b5ccc 100644 --- a/src/domain/Box.java +++ b/src/domain/Box.java @@ -355,15 +355,15 @@ public class Box { if(savedGamemode.equals("Special8")){ - if(setCategoryOne + setCategoryTwo + setCategoryThree + setCategoryFour - + setCategoryFive + setCategorySix + setCategorySeven + setCategoryEight >= 108){ + if(nullCheckInt(setCategoryOne) + nullCheckInt(setCategoryTwo) + nullCheckInt(setCategoryThree) + nullCheckInt(setCategoryFour) + + nullCheckInt(setCategoryFive) + nullCheckInt(setCategorySix) + nullCheckInt(setCategorySeven) + nullCheckInt(setCategoryEight) >= 108){ this.bonus = 35; } } else - if(setCategoryOne + setCategoryTwo + setCategoryThree + setCategoryFour - + setCategoryFive + setCategorySix >= 63){ + if(nullCheckInt(setCategoryOne) + nullCheckInt(setCategoryTwo) + nullCheckInt(setCategoryThree) + nullCheckInt(setCategoryFour) + + nullCheckInt(setCategoryFive) + nullCheckInt(setCategorySix) >= 63){ this.bonus = 35; } @@ -440,4 +440,12 @@ public class Box { else return "" + i; } + + public int nullCheckInt(Integer i) { + + if(i == null) + return 0; + else + return i; + } }