Skip to content
Snippets Groups Projects
Commit d13c3305 authored by ousseyn01's avatar ousseyn01
Browse files

Firefighter is DONE

parent b8a489ed
Branches
No related tags found
No related merge requests found
package model;
import model.TargetStrategy;
import util.Position;
import java.util.List;
import java.util.Map;
import java.util.Set;
public class Firefighter {
private Position position;
public Firefighter(Position position) {
//this.firefighterPositions = firefighterPositions;
this.position = position;
//this.neighbors = neighbors;
}
public Position getPosition() {
return position;
}
public void setPosition(Position position) {
this.position = position;
}
public Position moveToBestPosition(TargetStrategy targetStrategy, Set<Position> firePositions, Map<Position, List<Position>> neighbors) {
return targetStrategy.neighborClosestToFire(position, firePositions, neighbors);
}
public void extinguish(Position position, Set<Position> firePositions) {
firePositions.remove(position);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment