Skip to content

Commit eb83b0f

Browse files
authored
Update AttackingPairsHeuristic.java
return type of getNumberOfAttackingPairs() is int. Ideally, return type of h() should be int
1 parent 7cb9235 commit eb83b0f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

aima-core/src/main/java/aima/core/environment/nqueens/AttackingPairsHeuristic.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
*/
1111
public class AttackingPairsHeuristic implements HeuristicFunction {
1212

13-
public double h(Object state) {
13+
public int h(Object state) {
1414
NQueensBoard board = (NQueensBoard) state;
1515
return board.getNumberOfAttackingPairs();
1616
}
17-
}
17+
}

0 commit comments

Comments
 (0)