示例#1
0
        public Card SpecialCard(string id)
        {
            Card card;

            SpecialCards.TryGetValue(id, out card);
            return(card);
        }
示例#2
0
        public void SpecialEmptyTest()
        {
            special = new BiYak(null);
            int point      = 0;
            var collection = new Object();

            special.CollectionEmpty += (s, e) => { collection = s; point = ((SpecialEmptyEventArgs)e).Points; };
            Assert.AreEqual(20, point);
            Assert.IsInstanceOfType(collection, typeof(SpecialCards));
        }
示例#3
0
        public override void Behave(Desk desk)
        {
            var specialCard = SpecialCards.PickOne();

            if (!(specialCard is CardCY))
            {
                desk.AddMessageLine($"Cy牌: 表达出{specialCard.ShortName}: {specialCard.Description}");
            }
            specialCard.Behave(desk);
        }
示例#4
0
        private void VerifySpecialCards()
        {
            if (SpecialCards == null)
            {
                SpecialCards = new Dictionary <string, Card>();
            }

            if (!SpecialCards.ContainsKey("gameover_coal"))
            {
                SpecialCards.Add("gameover_coal", new Card("The city runs out of coal to run the generator, and freezes over.", "", "",
                                                           _defaultGameOverCharacter,
                                                           new GameOverOutcome(),
                                                           new GameOverOutcome(),
                                                           null));
            }
            if (!SpecialCards.ContainsKey("gameover_food"))
            {
                SpecialCards.Add("gameover_food", new Card("Hunger consumes the city, as food reserves deplete.", "", "",
                                                           _defaultGameOverCharacter,
                                                           new GameOverOutcome(),
                                                           new GameOverOutcome(),
                                                           null));
            }
            if (!SpecialCards.ContainsKey("gameover_health"))
            {
                SpecialCards.Add("gameover_health", new Card("The city's population succumbs to wounds and spreading diseases.", "", "",
                                                             _defaultGameOverCharacter,
                                                             new GameOverOutcome(),
                                                             new GameOverOutcome(),
                                                             null));
            }
            if (!SpecialCards.ContainsKey("gameover_hope"))
            {
                SpecialCards.Add("gameover_hope", new Card("All hope among the people is lost.", "", "",
                                                           _defaultGameOverCharacter,
                                                           new GameOverOutcome(),
                                                           new GameOverOutcome(),
                                                           null));
            }
        }