Skip to content

Commit

Permalink
Fixed paths not displaying behind rover
Browse files Browse the repository at this point in the history
  • Loading branch information
Gold872 committed Nov 28, 2024
1 parent 647be88 commit a3cf4fc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/src/models/view/map.dart
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,11 @@ class AutonomyModel with ChangeNotifier, BadAppleViewModel {

if (data.hasDestination() && data.destination.toGridBlock == roverCoordinates) {
return AutonomyCell.destination;
} else if (markers.any((e) => e.toGridBlock == roverCoordinates)) {
} else if (data.obstacles.map((e) => e.toGridBlock).contains(roverCoordinates)) {
return AutonomyCell.obstacle;
} else if (markers.map((e) => e.toGridBlock).contains(roverCoordinates)) {
return AutonomyCell.marker;
} else if (data.path.map((e) => e.toGridBlock).contains(roverCoordinates.toGridBlock)) {
} else if (data.path.map((e) => e.toGridBlock).contains(roverCoordinates)) {
return AutonomyCell.path;
}

Expand Down

0 comments on commit a3cf4fc

Please sign in to comment.