コード例 #1
0
        /// <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));
            }
        }
コード例 #2
0
ファイル: Runner.cs プロジェクト: Corniel/AIGames.Warlight2
        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;
            }
        }