예제 #1
0
파일: MapCM.cs 프로젝트: AciesNN/cyc
		internal void BuyArmy(int playerID, int islandID)
		{
			ArmyUnitCM army = new ArmyUnitCM()
			{
				OwnerID = playerID,
				IslandID = islandID
			};

			Army.Add(army);

			if (OnBuyArmy != null)
				OnBuyArmy(playerID, islandID);
		}
예제 #2
0
파일: Context.cs 프로젝트: AciesNN/cyc
		void AddIsland(int owner, int hornsCount, List<Hex> cells)
		{
			List<Build> slots = Enumerable.Repeat(Build.None, cells.Count).ToList();

			IslandCM island = new IslandCM()
			{
				ID = map.Islands.Count,
				OwnerID = owner,
				Cells = cells,
				Horns = hornsCount,
				Slots = slots
			};

			map.Islands.Add(island);

			if (owner != PlayerInfoCM.NoID)
			{
				ArmyUnitCM army = new ArmyUnitCM()
				{
					OwnerID = owner,
					IslandID = map.Islands.Count - 1
				};

				map.Army.Add(army);
			}
		}