Skip to content
Permalink
Browse files

Fix bug so we can compile game state

  • Loading branch information
joesweeney committed Apr 19, 2017
1 parent 61aa15f commit 6289b819fcca784318733175df856dce47f7cc4c
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/CheckersGameState3.java
@@ -292,7 +292,7 @@ public double pieceRatio(int player){
//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){
@@ -301,12 +301,12 @@ public boolean isLoner(int pos){
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);

0 comments on commit 6289b81

Please sign in to comment.
You can’t perform that action at this time.