Select Git revision
RockBehavior.java
Forked from
COUETOUX Basile / FirefighterStarter
16 commits ahead of the upstream repository.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
RockBehavior.java 742 B
package model;
import util.Position;
import java.util.List;
import java.util.Map;
public class RockBehavior implements Behavior{
@Override
public List<Position> update(BoardData boardData, Element element) {
ChargeTarget chargeTarget= (ChargeTarget) element;
if (chargeTarget.isCharged()){
chargeTarget.resetCounter();
boardData.addElement(Fire.factory.getNewElement(boardData,element.getPosition()));
}
return null;
}
@Override
public List<Position> legalNeighbors(BoardData boardData, Position position) {
return null;
}
@Override
public Map<Position, List<Position>> allLegalNeighbors(BoardData boardData) {
return null;
}
}