File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
src/main/java/pl/nogacz/chess Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -25,18 +25,16 @@ public int calculateBoard() {
2525 if (entry .getValue ().getColor ().isWhite ()) {
2626 if (pawnMoves .getPossibleCheck ().size () > 0 ) {
2727 whitePoint += 100 ;
28- blackPoint -= 100 ;
2928 } else if (pawnMoves .getPossibleKick ().size () > 0 ) {
30- whitePoint += 20 ;
29+ whitePoint += 5 ;
3130 }
3231
3332 whitePoint += calculatePawn (entry .getKey (), entry .getValue ());
3433 } else {
3534 if (pawnMoves .getPossibleCheck ().size () > 0 ) {
3635 blackPoint += 100 ;
37- whitePoint -= 100 ;
3836 } else if (pawnMoves .getPossibleKick ().size () > 0 ) {
39- blackPoint += 20 ;
37+ blackPoint += 5 ;
4038 }
4139
4240 blackPoint += calculatePawn (entry .getKey (), entry .getValue ());
Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ public void readMouseEvent(MouseEvent event) {
117117 if (!gameLogic .isMovePossible ()) {
118118 noMovePossibleInfo ();
119119 } else if (isKingChecked && possiblePawnIfKingIsChecked .size () == 0 ) {
120- if (gameLogic .isKingChecked (PawnColor .WHITE )) {
120+ if (gameLogic .isKingChecked (PawnColor .BLACK )) {
121121 statistics .addGameWin ();
122122 endGame ("You win! Congratulations :)" );
123123 } else {
You can’t perform that action at this time.
0 commit comments