コード例 #1
0
 public void SetUp() {
     Deck.Shuffle();
     Charge = 1;
     for (int i = 0; i < 5; i++) {
         Card drawn = DrawCard();
         if (drawn != null) {
             ShieldZone.Put(drawn);
         } else {
             break;
         }
     }
     for (int i = 0; i < 5; i++) {
         Draw();
     }
 }
コード例 #2
0
        public Duelist(Game game, params Type[] cards) {
            Game = game;
            DuelAction = new DuelAction(this);
            TaskList = new DuelTaskList(this);
            Deck = new Zone(this);
            Hand = new Hand(this);
            ShieldZone = new ShieldZone(this);
            ManaZone = new Zone(this);
            BattleZone = new BattleZone(this);
            Graveyard = new Zone(this);

            AllCards = new Card[cards.Length];
            int i = 0;
            foreach (Type card in cards) {
                Card createdCard = (Card)Activator.CreateInstance(card, this);
                AllCards[i] = createdCard;
                Deck.Put(createdCard);
                i += 1;
            }
        }
コード例 #3
0
 public string PrintZones() {
     return $"Deck: {Deck.Print()}\r\nHand: {Hand.Print()}\r\nShield Zone: {ShieldZone.Print()}\r\nMana Zone: {ManaZone.Print()}\r\nBattle Zone: {BattleZone.Print()}\r\nGraveyard: {Graveyard.Print()}\r\n";
 }