findObstacles method

  1. @override
bool findObstacles()
override

Implementation

@override
bool findObstacles() {
  final coordinates = collection.gps.coordinates;
  var result = false;
  for (final obstacle in obstacles) {
    if (!obstacle.isNear(coordinates)) continue;
    result = true;
    collection.pathfinder.recordObstacle(obstacle.coordinates);
  }
  return result;
}