Menu

#32 Checkers bugs

open-accepted
None
5
2005-11-20
2005-11-20
No

1. Stale position.. I didnt have any moves. and I
cuold not pass or anything.

2. The disposition.. shouldnt it be 2 populated rows
and not three in teh beginning?

Discussion

  • Anton Modaresi

    Anton Modaresi - 2005-11-20

    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

     
  • Anton Modaresi

    Anton Modaresi - 2005-11-20

    Logged In: YES
    user_id=528333

    nvm the second remark, 3 rows are correct, sorry

     
  • Anton Modaresi

    Anton Modaresi - 2005-11-20
    • assigned_to: nobody --> alex-t
    • status: open --> open-accepted
     
  • Nobody/Anonymous

    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();
    }
    }

     

Log in to post a comment.