Exemplo n.º 1
0
        //渲染剩余卡牌
        public void 渲染卡牌剩余(Card_Library rc, Card_Library rc1)
        {
            string card_Remaining = "还剩:";                                    //剩余卡牌

            char[] Remaining = new char[rc.library.Length.ToString().Length]; //剩余卡牌数量
            foreach (int i in Program.range(Remaining.Length))
            {
                Remaining[i]    = Method.数字半转全(rc.library.Length.ToString()[i]);
                card_Remaining += Remaining[i];
            }
            card_Remaining += "张牌";
            foreach (int i in Program.range(display0.GetLength(1)))
            {
                display0[3, i] = 插入(取一维数组(display0, 3), card_Remaining.ToCharArray(), display0.GetLength(1) / 2 + 10)[i];
            }

            string card_Remaining1 = "还剩:";                                     //剩余卡牌

            char[] Remaining1 = new char[rc1.library.Length.ToString().Length]; //剩余卡牌数量
            foreach (int i in Program.range(Remaining1.Length))
            {
                Remaining1[i]    = Method.数字半转全(rc1.library.Length.ToString()[i]);
                card_Remaining1 += Remaining1[i];
            }
            card_Remaining1 += "张牌";
            foreach (int i in Program.range(display0.GetLength(1)))
            {
                display0[display0.GetLength(0) - 1 - 3, i] = 插入(取一维数组(display0, display0.GetLength(0) - 1 - 3), card_Remaining1.ToCharArray(), display0.GetLength(1) / 2 + 10)[i];
            }
        }
Exemplo n.º 2
0
 //构造方法
 public Game()
 {
     /*
      * Card card0 = new Card("炎魔之王拉格纳罗斯", 8, 8, "让火焰净化一切", 8);
      * Card[] card1 = new Card[7]; //敌方随从
      * Card[] card2 = new Card[7]; //我方随从
      * foreach (int i in Program.range(card1.Length))
      * {
      *  card1[i] = card0;
      *  card2[i] = card0;
      * }
      */
     this.team0_Entourage = new Card[0];
     this.team1_Entourage = new Card[0];
     this.team1_hero      = new Hero(5);
     this.team0_hero      = new Hero(2);
     this.crystal_0_upper = 1;
     this.crystal_1_upper = 1;
     this.Remaining_card  = new Card_Library();
     this.Remaining_card1 = new Card_Library();
     this.hand_card       = new Card[0];
     this.hand_card1      = new Card[0];
     this.round           = true;
     this.game_history    = new List <string>();
 }
Exemplo n.º 3
0
        private Card[] hand_card;                    //保存手牌信息


        //构造方法
        public console(Hero h0, Hero h1, Card[] te0, Card[] te1, bool r, int cry0, int cry1, Card_Library rc, Card_Library rc1, Card[] hc)
        {
            this.team0_hero      = h0;
            this.team1_hero      = h1;
            this.team0_Entourage = te0;
            this.team1_Entourage = te1;
            this.round           = r;
            this.crystal_0       = cry0;
            this.crystal_1       = cry1;
            this.Remaining_card  = rc;
            this.Remaining_card1 = rc1;
            this.hand_card       = hc;
        }