Ejemplo n.º 1
0
        private void BuildStation(Player player)
        {
            var stationSelection = player.SelectStation();

            UsedCards.AddRange(stationSelection.Cards);
            player.Cards.RemoveAll(c => stationSelection.Cards.Contains(c));

            MapCities.Single(c => c.City.Id == stationSelection.StationId).Owner = player;
        }
Ejemplo n.º 2
0
        private void BuildStation(int objectId, List <Card> cardsForPayment, Player player)
        {
            var city = MapCities.Single(c => c.City.Id == objectId);

            if (city.Owner == null)
            {
                city.Owner = player;
                foreach (var card in cardsForPayment)
                {
                    player.Cards.Remove(card);
                }
            }
            else
            {
                throw new ArgumentException("This city is already occupated");
            }
        }