From 2bfdeacb54fd08b4423b944724948f706935cc74 Mon Sep 17 00:00:00 2001 From: "s.eser" Date: Tue, 30 Apr 2024 11:41:41 +0200 Subject: [PATCH] updateBonus fix --- bin/domain/Box.class | Bin 11774 -> 11934 bytes src/domain/Box.java | 16 ++++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/bin/domain/Box.class b/bin/domain/Box.class index 142c7d1d8674b07f801cdeaf11ec5c4ebe136fb6..36c4a5b079fb9f5443346d59beb746688cfbac92 100644 GIT binary patch delta 2646 zcmbW3`%e^C6vxlmMRu88*aZ|su(eeIcR>(Q1XSc%!3PRdrPSgI%kJv3OP7a_woc#n zp_O`z1!+l0OlTULXs}yDQma2TY1*{?+5Q>*rM1zXdu9f1V@ync@N@5c=FEM3ckbZB zo|&WCPY)OF06;x{c~d)|R;2+VxDnAtO>8t8Z43wdPPWEI5ORw5o(PNu%A$c-sEkZ7 z6in1^XicLhQpA zHTVtd-O!8;;%67FNBr$7P2G)c4r~>rZa?l3-R>Fv1t;!D$mk1DaPh>M_E@lH4Lb3F z;<`@7*>xazt-7voB4|{0A$Tm?5+6-)=^<4{#*E4%%9x#z(_Gm0k}_y#a4Z;O{jy@4 zBcbpJ+gIq9w5IAxM23c|zA)cBChn%^<8kpvdR|IDy%yr0Cugq{2N0H9&oo3r zog=hvW3(_rmUX8)5FR;eZs-I;rsW&Mfmolh`l#s1D9DK^8|$cOs^F=I#KnyKBMIe} z5u@frdO;V{F>)k1rp#akN&2+1X){T(XD@qJbiJ+&V?;-H&MCuK(UE>r(N=b(-$u~1 zSie#70m2F^i55C^yW^w7G7Nh9BXP%5fEUDl z&#G0QAY@x*OF>f6xbS#$Q!dN%H=dDGPUbUZi)MUeuOJ;tI@qnTSTNBT4Ga$lhaEU2 zhP*zUo}cy}MNFUnE3-CRF9$myeHXs+-GZ%Iza-(;Dd_Rh#f2n1lI;Yw$7E;H>P%am z8LKmEb*@>RIoa_>XQ9LAU3(kqzeW2Tv^+kp{uBdy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QZPAv-Zu zUu1N0axBp8j}C>nWB?&6(J9yI33|Fl!^7NnO4#kW1#c-8-f{ofm^VtBjB>?k1eb6) zTxJUni&OUOoFGDaV!F1FKRjf-O-S6d=V!gGyi;#gdlgSHCLY*#W`&h5BOc9ylj5=6 z6^kfSCi0=qsPe|~fXL3Mc63IrPWG%ayO9{l^UA!5$VgvQbjRpOC`Z02`B?-_J3SGe zo-&>zR}$5IC?1plNZ1^CdDjt~i8T8Cq3C)3xKwmQcpTaI ziRgFaSI#S2j;BHupCR2F1pRP09Eh}y`KP7=Qz>{Gp-9Z@MdlRza`lm85K&)sXEZu9 z3%~?O7x8ZCcTk)0Xbt{Y0I&G5xFy{&whTv09lO@S^F3^>Kr7jbn4@JG^lf{eMw+3H zcpNeTa2Rw9f*VKZCI#stjnGXA(nT4en-GLHYL8IcMeQ*RK|h{>0UU=57=|mCKw}0yj?+&vn4Z8ulYCXNSnM;wmUvn`OU>%Vk{XPe;1-Rk zq|F6re`WyF>`!R!{{eS&|MQ;MTUJU>H`XwD12up(w4Gpcn@zf6?y#Z7w`&&JI2E(R z#wATGKG8BO3TAuQ*KD#Bv%)4@FL-&+oQkXo}EhVw`}qibB|1H1D{jWDi=Mk zm^C&pDCRFV1&Y~V^P*yYX7iF_9}L;c-9gI6y}i!D5=hI;^L=Cl9j~Oiytr1K4tHfxr|6`dm$};2p`vmhH<`i?97(;xQAI>o^FyCXwn3tJXnIAB( nF+XO`F>f+IW&Yb@iM5pZoAAFca0>-}D)|r1=lBKQf!x0Vy?x|Z 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; + } }