static void Main(string[] args) { var deck = new Card[30]; for (var i = 0; i < deck.Length; i++) { switch (i % 3) { case 0: deck[i] = new AcolyteOfPain(); break; case 1: deck[i] = new FuriousWolf(); break; case 2: deck[i] = new BlackMagician(); break; } } game = new Game(0, new Player("XBagon", deck), new Player("Enemy", deck)); while (true) { Commands.WaitForCommand(); } }
public void WhenInDesk() { AcolyteOfPain acolyteOfPain = InitNewCardInGame <AcolyteOfPain>(); SetCardInDesk(acolyteOfPain); Card eviscerate = gameContext.GetActivationUserContext().AllCards.First(c => c.GetType() == typeof(Eviscerate)); SetSomeCardInHand(eviscerate); List <Card> waittingDrawCards = gameContext.GetActivationUserContext().StockCards.Take(1).ToList(); GameResult <GameContextOutput> res = proxy.CastSpell(gameContext.GameCode, gameContext.GetActivationUserContext().UserCode, eviscerate.CardInGameCode, acolyteOfPain.DeskIndex) as GameResult <GameContextOutput>; Xunit.Assert.True(res.code == (int)OperateResCodeEnum.成功); Xunit.Assert.True(waittingDrawCards.All(c => c.CardLocation == CardLocation.手牌)); Xunit.Assert.True(gameContext.GetActivationUserContext().HandCards.Count() == 1); }