private bool positionNotTooFarAheadAndMovable(EncounterState state, EncounterPosition parentPos, Unit unit, EncounterPosition possible) { var entitiesAtPos = state.EntitiesAtPosition(possible.X, possible.Y); if (!AIUtils.IsNextRowTooFarAhead(parentPos, unit) && entitiesAtPos.Count == 0) { return(true); } var hostilesAtPos = AIUtils.HostilesInPosition(state, FactionName.PLAYER, possible.X, possible.Y); if (hostilesAtPos.Count > 0) { return(true); } return(false); }