Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix bug so we can compile game state
  • Loading branch information
joesweeney committed Apr 19, 2017
1 parent 61aa15f commit 6289b81
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/CheckersGameState3.java
Expand Up @@ -292,7 +292,7 @@ public class CheckersGameState3 implements CheckersGameState{
//System.out.println("" + mypieces);
return mypieces/total;
}

//features
public boolean isLoner(int pos){
if(this.board[pos-5] == 0 && this.board[pos-4] ==0 && this.board[pos+4] ==0 && this.board[pos+5] ==0){
Expand All @@ -301,12 +301,12 @@ public class CheckersGameState3 implements CheckersGameState{
return false;
}
public boolean isSafe(int pos){
if(this.board[pos%9==4] || this.board[pos%9==3]){
if(pos%9==4 || pos%9==3){
return true;
}
return false;
}

public boolean isTerminal(){
double rat = pieceRatio(this.player);
return (rat == 0 || rat == 1);
Expand Down

0 comments on commit 6289b81

Please sign in to comment.