Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix bug in jumps
  • Loading branch information
sas12028 committed Apr 5, 2017
1 parent 8388b88 commit 9d84c5e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/CheckersGameState2.java
Expand Up @@ -124,6 +124,7 @@ public class CheckersGameState2 implements CheckersGameState {
private ArrayList<Move> findJumpMoves(int starting, int current, int[] path) {
ArrayList<Move> moves = new ArrayList<Move>();
int piece = board[starting];
board[starting] = 0;
int[] neighbors = neighbors(current);
int beg, end;
if(piece == 1) {
Expand Down Expand Up @@ -154,6 +155,7 @@ public class CheckersGameState2 implements CheckersGameState {
}
}
}
board[starting] = piece;
return moves;
}

Expand Down

0 comments on commit 9d84c5e

Please sign in to comment.