private void AddSameSettlementLocationToDictionary(TileCtrl tile, SettlementCtrl inputSettlementCtrl) { RoadLocation[] adjTileLocations = null; SettlementLocation[] settlementLocation = null; SettlementLocation inputLocation = inputSettlementCtrl.SettlementLocation; switch (inputLocation) { case SettlementLocation.TopRight: adjTileLocations = new RoadLocation[3] { RoadLocation.None, RoadLocation.Top, RoadLocation.TopRight }; settlementLocation = new SettlementLocation[3] { inputLocation, SettlementLocation.BottomRight, SettlementLocation.MiddleLeft }; break; case SettlementLocation.MiddleRight: adjTileLocations = new RoadLocation[3] { RoadLocation.None, RoadLocation.TopRight, RoadLocation.BottomRight }; settlementLocation = new SettlementLocation[3] { inputLocation, SettlementLocation.BottomLeft, SettlementLocation.TopLeft }; break; case SettlementLocation.BottomRight: adjTileLocations = new RoadLocation[3] { RoadLocation.None, RoadLocation.BottomRight, RoadLocation.Bottom }; settlementLocation = new SettlementLocation[3] { inputLocation, SettlementLocation.MiddleLeft, SettlementLocation.TopRight }; break; case SettlementLocation.BottomLeft: adjTileLocations = new RoadLocation[3] { RoadLocation.None, RoadLocation.Bottom, RoadLocation.BottomLeft }; settlementLocation = new SettlementLocation[3] { inputLocation, SettlementLocation.TopRight, SettlementLocation.MiddleRight }; break; case SettlementLocation.MiddleLeft: adjTileLocations = new RoadLocation[3] { RoadLocation.None, RoadLocation.BottomLeft, RoadLocation.TopLeft }; settlementLocation = new SettlementLocation[3] { inputLocation, SettlementLocation.TopRight, SettlementLocation.BottomRight }; break; case SettlementLocation.TopLeft: adjTileLocations = new RoadLocation[3] { RoadLocation.None, RoadLocation.TopLeft, RoadLocation.Top }; settlementLocation = new SettlementLocation[3] { inputLocation, SettlementLocation.MiddleRight, SettlementLocation.BottomLeft }; break; case SettlementLocation.None: break; default: break; } AddSettlementClonesToDictionary(tile, adjTileLocations, settlementLocation); }
public SettlementCtrl GetSettlement(TileCtrl tile, SettlementLocation loc) { return(GetSettlement(new SettlementKey(tile, loc))); }