Пример #1
0
        protected virtual bool InitGame()
        {
            foreach (var player in PlayerList)
            {
                if (ColorDeck.Count > 0)
                {
                    player.Color = ColorDeck.Pop();
                }
                else
                {
                    Console.WriteLine("[WARN]Color deck is empty!");
                }

#if DEBUG
                player.Coins = 1000;
                for (int i = 0; i < 10; i++)
#else
                player.Coins = 10;
                for (int i = 0; i < 3; i++) // Каждому по 3 карты
#endif
                {
                    if (InventDeck.Count > 0)
                    {
                        player.Inventions.Add(InventDeck.Pop());
                    }
                    else
                    {
                        Console.WriteLine("[FAIL]Invent deck is empty! Can't Continue game");
                    }
                }
            }
            return(true);
        }
Пример #2
0
        protected virtual bool Researching()
        {
            foreach (var player in PlayerList)
            {
                if (player.Action != GameAction.Research)
                {
                    continue;
                }

                player.Coins += 2;
                player.Inventions.Add(InventDeck.Pop());
                player.Action = GameAction.None;
                Console.WriteLine($"{player.Name} провёл исследование");
            }
            return(true);
        }