mirror of
https://github.com/dancojocaru2000/ai-project-idastar.git
synced 2025-02-22 16:39:35 +02:00
Fix bug lol
This commit is contained in:
parent
521c4be3ac
commit
33d3b77d53
1 changed files with 2 additions and 2 deletions
|
@ -152,7 +152,7 @@ namespace IdaStar
|
|||
Point findPoint(CellState neededState) {
|
||||
for (var i = 0; i < _board.Count; i++) {
|
||||
for (var j = 0; j < _board[i].Count; j++) {
|
||||
if (_board[i][j] == CellState.START) {
|
||||
if (_board[i][j] == neededState) {
|
||||
return new(i, j);
|
||||
}
|
||||
}
|
||||
|
@ -205,7 +205,7 @@ namespace IdaStar
|
|||
}
|
||||
|
||||
var threshold = heuristic(startPoint, destinationPoint);
|
||||
while (threshold == zero) {
|
||||
while (threshold != zero) {
|
||||
threshold = search(startPoint, zero, threshold);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue