From e9869030ac043998d03c225a735c053effed42f7 Mon Sep 17 00:00:00 2001 From: aah13002 Date: Sat, 30 Apr 2016 23:00:54 -0400 Subject: [PATCH] Added apexHeuristic --- src/model/Board.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/model/Board.java b/src/model/Board.java index 06b1820..03e243d 100755 --- a/src/model/Board.java +++ b/src/model/Board.java @@ -449,15 +449,13 @@ public class Board { noKings = (color == Color.BLACK && this.blackKings == 0) || (color == Color.WHITE && this.whiteKings == 0); - if (piece7.getColor() == color) { + if (piece7 != null && piece7.getColor() == color) { eitherSquaresOccupiedByActiveMan |= active7; + neitherSquaresOccupiedByPassiveMan &= active7; } - if (piece26.getColor() == color) { + if (piece26 != null && piece26.getColor() == color) { eitherSquaresOccupiedByActiveMan |= active26; - } - - if (piece7.getColor() == color && piece26.getColor() == color) { - if () + neitherSquaresOccupiedByPassiveMan &= active26; } if (noKings && eitherSquaresOccupiedByActiveMan && neitherSquaresOccupiedByPassiveMan)