public bool isGoalState(Object state)
{
NQueensBoard board = (NQueensBoard)state;
return board.getNumberOfQueensOnBoard() == board.getSize()
&& board.getNumberOfAttackingPairs() == 0;
}
}
// END - Interface FitnessFunction // // // START - Interface GoalTest public bool isGoalState(Object state) { return(goalTest.isGoalState(getBoardForIndividual((String)state))); }