Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add result test
  • Loading branch information
sas12028 committed Apr 5, 2017
1 parent c46033c commit 0a4b4df
Show file tree
Hide file tree
Showing 2 changed files with 419 additions and 409 deletions.
4 changes: 3 additions & 1 deletion src/CheckersGameState2.java
Expand Up @@ -40,6 +40,7 @@ public class CheckersGameState2 implements CheckersGameState {
for(Move m: s.actions()){
System.out.println(m);
}
s.result(s.actions().get(0)).printState();

}

Expand Down Expand Up @@ -252,8 +253,9 @@ public class CheckersGameState2 implements CheckersGameState {
newBoard[captures[i]] = 0;
}
}
newBoard[move.destination()] = newBoard[move.source()];
int s = newBoard[move.source()];
newBoard[move.source()] = 0;
newBoard[move.destination()] = s;

if(promote(move.source(), move.destination())) {
newBoard[move.destination()] += 2;
Expand Down

0 comments on commit 0a4b4df

Please sign in to comment.