Esempio n. 1
0
        private void chackBrands()
        {
            FlowerBrand f1 = new FlowerBrand(1);
            FlowerBrand f2 = new FlowerBrand(1);

            Console.WriteLine();
            //Console.WriteLine(f1.Equals(f2));
            Console.WriteLine(chackBrandClass(f1, f2));
            Console.WriteLine(chackBrandNumber(f1, f2));
            Console.WriteLine(f1.getNumber() == f2.getNumber());
        }
Esempio n. 2
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();
        }