/// <summary>Handles the setup instruction.</summary> public void Setup(SetupRegionsInstruction instruction) { Guard.NotNull(instruction, "instruction"); foreach (var info in instruction.Regions) { var superRegion = m_SuperRegions[info.SuperRegionId]; Add(new Region(info.Id, superRegion)); } }
private void ParseSetupMap(string line, string[] tokens) { switch (tokens[1]) { case "super_regions": this.Map.Setup(SetupSuperRegionsInstruction.Detokenize(tokens)); break; case "regions": this.Map.Setup(SetupRegionsInstruction.Detokenize(tokens)); break; case "neighbors": this.Map.Setup(SetupNeighborInstruction.Detokenize(tokens)); break; } }