package example7_2.game; import java.util.List; /** * A move behavior that stays stationary. * @author macavaneys */ public class StationaryMoveBehavior implements MoveBehavior { /** * The character associated with this move behavior */ private GameCharacter gc; /** * Creates a new StationaryMOveBehavior for the specified character */ public StationaryMoveBehavior(GameCharacter character) { this.gc = character; } /** * Stays at the current location */ @Override public void planMove(List list) { gc.setTargetPosition(gc.getCurrentRow(), gc.getCurrentColumn()); Game.validateMove(gc); } }