Пример #1
0
        public BrandsTest()
        {
            BrandPlayer a = new BrandPlayer();

            BrandFactory x = new BrandFactory();
            x.createBrands();
            x.randomBrands();

            //x.PrintRadomTable(); //�C�X�üƪ�
            a = x.getBrands();

            Iterator ai;
            ai = a.creatIterator(10);
            print(ai);

            ai = a.creatIterator(3);
            a=removefromplayer(ai,a);

            ai = a.creatIterator(10);
            print(ai);

            //Console.WriteLine();
            //Console.Write("{0},{1}\n", sa.getReadyBrand().getClass(),sa.getReadyBrand().getNumber());

            //chackBrands();
            //chackArrayList();

            x.creatImageArray();
        }
Пример #2
0
        /// <summary>
        /// �ƧǵP���غc�l
        /// </summary>
        /// <param name="player">���a</param>
        public PlayerSort(BrandPlayer player)
        {
            this.inputPlayer = player;
            for (int i = 0; i < tempPlayers.Length; i++)
                tempPlayers[i] = new BrandPlayer();
            teamBrands = new BrandPlayer();
            BrandClass[0] = new FlowerBrand(0);
            BrandClass[1] = new TenThousandBrand(0);
            BrandClass[2] = new RopeBrand(0);
            BrandClass[3] = new TubeBrand(0);
            BrandClass[4] = new WordBrand(0);

            getBrands( inputPlayer.creatIterator() );
            sortPlayer();
            sortTeam();
            compose();
        }
Пример #3
0
        /// <summary>
        /// 排序牌的建構子
        /// </summary>
        /// <param name="player">玩家</param>
        /// <param name="b1">牌類別1</param>
        /// <param name="b2">牌類別2</param>
        /// <param name="b3">牌類別3</param>
        /// <param name="b4">牌類別4</param>
        /// <param name="b5">牌類別5</param>
        public PlayerSort(BrandPlayer player, Brand b1, Brand b2, Brand b3, Brand b4, Brand b5)
        {
            this.inputPlayer = player;
            for (int i = 0; i < tempPlayers.Length; i++)
            {
                tempPlayers[i] = new BrandPlayer();
            }
            teamBrands    = new BrandPlayer();
            BrandClass[0] = b1;
            BrandClass[1] = b2;
            BrandClass[2] = b3;
            BrandClass[3] = b4;
            BrandClass[4] = b5;

            getBrands(inputPlayer.creatIterator());
            sortPlayer();
            sortTeam();
            compose();
        }
Пример #4
0
        /// <summary>
        /// 排序牌的建構子
        /// </summary>
        /// <param name="player">玩家</param>
        public PlayerSort(BrandPlayer player)
        {
            this.inputPlayer = player;
            for (int i = 0; i < tempPlayers.Length; i++)
            {
                tempPlayers[i] = new BrandPlayer();
            }
            teamBrands    = new BrandPlayer();
            BrandClass[0] = new FlowerBrand(0);
            BrandClass[1] = new TenThousandBrand(0);
            BrandClass[2] = new RopeBrand(0);
            BrandClass[3] = new TubeBrand(0);
            BrandClass[4] = new WordBrand(0);

            getBrands(inputPlayer.creatIterator());
            sortPlayer();
            sortTeam();
            compose();
        }
Пример #5
0
        /// <summary>
        /// �ƧǵP���غc�l
        /// </summary>
        /// <param name="player">���a</param>
        /// <param name="b1">�P���O1</param>
        /// <param name="b2">�P���O2</param>
        /// <param name="b3">�P���O3</param>
        /// <param name="b4">�P���O4</param>
        /// <param name="b5">�P���O5</param>
        public PlayerSort(BrandPlayer player,Brand b1,Brand b2,Brand b3,Brand b4,Brand b5)
        {
            this.inputPlayer = player;
            for (int i = 0; i < tempPlayers.Length; i++)
                tempPlayers[i] = new BrandPlayer();
            teamBrands = new BrandPlayer();
            BrandClass[0] = b1;
            BrandClass[1] = b2;
            BrandClass[2] = b3;
            BrandClass[3] = b4;
            BrandClass[4] = b5;

            getBrands(inputPlayer.creatIterator());
            sortPlayer();
            sortTeam();
            compose();
        }
Пример #6
0
 private void addimage_player(BrandPlayer player, location state, RotateFlipType rotate)
 {
     Iterator temp = player.creatIterator();
     addimage_iterator(temp, state, rotate);
     if (InvokeRequired)
         Invoke(new Update_delegate(Update));
     else
         Update();
 }
Пример #7
0
 void printplayer(BrandPlayer player,string val)
 {
     Console.WriteLine("\n=== Player {0}===",val);
         Iterator temp = player.creatIterator();
         print(temp);
 }
Пример #8
0
 void add_to_player(BrandPlayer player,BrandPlayer add)
 {
     Iterator temp = player.creatIterator();
     add_to_player_iterator(temp,add);
 }
Пример #9
0
 void printplayer(BrandPlayer player)
 {
     Console.WriteLine("\n=== Player ===");
     Iterator temp = player.creatIterator();
     print(temp);
 }