Browse Source

Fix bug lol

pull/1/head
Kenneth Bruen 3 years ago
parent
commit
33d3b77d53
Signed by: kbruen
GPG Key ID: C1980A470C3EE5B1
  1. 4
      IDAstar.cs

4
IDAstar.cs

@ -152,7 +152,7 @@ namespace IdaStar
Point findPoint(CellState neededState) { Point findPoint(CellState neededState) {
for (var i = 0; i < _board.Count; i++) { for (var i = 0; i < _board.Count; i++) {
for (var j = 0; j < _board[i].Count; j++) { for (var j = 0; j < _board[i].Count; j++) {
if (_board[i][j] == CellState.START) { if (_board[i][j] == neededState) {
return new(i, j); return new(i, j);
} }
} }
@ -205,7 +205,7 @@ namespace IdaStar
} }
var threshold = heuristic(startPoint, destinationPoint); var threshold = heuristic(startPoint, destinationPoint);
while (threshold == zero) { while (threshold != zero) {
threshold = search(startPoint, zero, threshold); threshold = search(startPoint, zero, threshold);
} }
} }

Loading…
Cancel
Save