private int getHeuristic2() { Tile currentValue; Tile expectedValue; int heuristic2; heuristic2 = 0; for (int i = Constants.MinimumValue; i < Constants.InvisibleValue; i++) { if (this.Values[i] < Constants.InvisibleValue) { currentValue = new Tile(this.Values[i]); expectedValue = new Tile(Solver.GoalArray[i]); heuristic2 += Tile.getCost(currentValue, expectedValue); } } return(heuristic2); }