I also found another bug while playing (problem source code below from CheckersController). Bug is that 'any' attacking move will allow a player to continue their move. So if player has two different pieces that can jump, and they take one jump, this logic will see that another piece can jump and will allow the move to continue.
The fix is to require subsequent jumps to be made by the same piece. I'm looking into an easy way to augment the code to do this, but am documenting the bug here.
// Its this player has just killed another piece check to see
// if the player can attack anymore. Otherwise its the
// other players turn
RezCheckersPieceMover pieceMover = checkersModel.getPieceMover();
int numOfAttackingMoves = pieceMover.countPossibleAttackingMoves(getSeatNum());
if (!(moveIsAnAttack && numOfAttackingMoves != 0)) {
// if not game over then next players turn
if (!checkGameOver()) {
// next players turn
nextPlayer();
}
}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=528333
the stale position: I had 3 pieces left on the side of the
board. It should be a draw Alex and I think
o
o o
x o
x
x
Logged In: YES
user_id=528333
nvm the second remark, 3 rows are correct, sorry
Logged In: NO
Re: the previous comment, #2 is wrong.
I also found another bug while playing (problem source code below from CheckersController). Bug is that 'any' attacking move will allow a player to continue their move. So if player has two different pieces that can jump, and they take one jump, this logic will see that another piece can jump and will allow the move to continue.
The fix is to require subsequent jumps to be made by the same piece. I'm looking into an easy way to augment the code to do this, but am documenting the bug here.
// Its this player has just killed another piece check to see
// if the player can attack anymore. Otherwise its the
// other players turn
RezCheckersPieceMover pieceMover = checkersModel.getPieceMover();
int numOfAttackingMoves = pieceMover.countPossibleAttackingMoves(getSeatNum());
if (!(moveIsAnAttack && numOfAttackingMoves != 0)) {
// if not game over then next players turn
if (!checkGameOver()) {
// next players turn
nextPlayer();
}
}