Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Adding backheuristic
  • Loading branch information
top13001 committed May 1, 2016
1 parent 220d8db commit 65a8631
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.7
21 changes: 20 additions & 1 deletion src/model/Board.java
Expand Up @@ -466,12 +466,31 @@ public class Board {
}

public int backHeuristic(Color color) {

if (whiteKings + blackKings == 0){
if (color == Color.BLACK){
Location thirty = samuelMapping(30);
Location thirty_two = samuelMapping(32);

if ((isActive(getPiece(thirty)) == false) && (isActive(getPiece(thirty_two))==false)){
return 1;
}
}
else { // White color
Location one = samuelMapping(1);
Location three = samuelMapping(3);

if ((isActive(getPiece(one)) == false) && (isActive(getPiece(three))==false)){
return 1;
}
}
}
return 0;
}

public int centHeuristic(Color color) {

int[] coordinates =

return 0;
}

Expand Down

0 comments on commit 65a8631

Please sign in to comment.