public static Position ThreeByThreeCenteredAt(Hardpoint center) { var hardpoints = new List <Hardpoint>(); for (int x = center.X - 1; x <= center.X + 1; x++) { for (int y = center.Y - 1; y <= center.Y + 1; y++) { hardpoints.Add(new Hardpoint(x, y, center.Z)); } } return(new Position(hardpoints)); }
public static FoundationComponent AtCenterPoint(Hardpoint centerPoint) { return(new FoundationComponent(Position.ThreeByThreeCenteredAt(centerPoint))); }
public IEnumerable <IFortressComponent> ComponentsByHardpoint(Hardpoint h) { return(componentsByHardpoint.ContainsKey(h) ? componentsByHardpoint[h] : Enumerable.Empty <IFortressComponent>()); }
public static PillarComponent AtPoint(Hardpoint point) { return(new PillarComponent(Position.OneByOneAt(point))); }
public static Position OneByOneAt(Hardpoint point) { return(new Position(new[] { point })); }