public getBrands ( ) : Mahjong.Players.BrandPlayer | ||
return | Mahjong.Players.BrandPlayer |
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(); }
/// <summary> /// �إߵP,�ä��t�P /// </summary> public void creatBrands() { factory = new BrandFactory(); factory.createBrands(); factory.randomBrands(); all.Table = factory.getBrands(); for (int i = 0; i < all.Table.getCount(); i++) all.Table.getBrand(i).WhoPush = location.Table; dealbrands(); }
public AiTest() { BrandPlayer[] player = new BrandPlayer[4]; BrandPlayer table = new BrandPlayer(); BrandFactory x = new BrandFactory(); x.createBrands(); x.randomBrands(); table = x.getBrands(); Deal deal = new Deal(16,table); deal.DealBrands(); player = deal.Player; printplayer(player); //SimpleAI sa = new SimpleAI(); //sa.setPlayer(player[0]); //PlayerSort bs = new PlayerSort(player[0]); //player[0] = bs.getPlayer(); //PlayerSort bs = new PlayerSort(player[0]); PlayerSort bs = new PlayerSort(player[0],new FlowerBrand(0),new TenThousandBrand(0),new RopeBrand(0),new TubeBrand(0),new WordBrand(0)); player[0] = bs.getPlayer; Level_1 l = new Level_1(); l.setPlayer(player[0]); l.getReadyBrand(); //printplayer(player); //Level_1 l = new Level_1(); //BrandPlayer test = new BrandPlayer(); //test.add(new WordBrand(1)); //test.add(new WordBrand(1)); //test.add(new WordBrand(1)); //test.add(new WordBrand(2)); //test.add(new WordBrand(3)); //test.add(new WordBrand(3)); //test.add(new WordBrand(3)); //test.add(new WordBrand(5)); //l.setPlayer(test); l.setPlayer(player[0]); Brand t = l.getReadyBrand(); Console.WriteLine("==>{0}{1}", t.getNumber(), t.getClass()); //printplayer(player); //sa.getReadyBrand(); //Console.WriteLine(); //Console.WriteLine("Ready Brand is {0},{1}", l.getReadyBrand().getClass(), l.getReadyBrand().getNumber()); }
public DealTest() { BrandPlayer[] player = new BrandPlayer[4]; BrandPlayer table = new BrandPlayer(); BrandFactory x = new BrandFactory(); x.createBrands(); x.randomBrands(); table = x.getBrands(); Console.WriteLine("�@��: {0}",table.getCount()); // �L�X�~�n���P printplayer(table,"�üƵP"); PlayerSort bbs = new PlayerSort(table); BrandPlayer sort_table = bbs.getPlayer; printplayer(sort_table,"�üƱƧǦ^�h"); // ���t�P Deal deal = new Deal(16,table); deal.DealBrands(); player = deal.Player; // �L�X���������a printplayer(player); BrandPlayer check = new BrandPlayer(); foreach (BrandPlayer b in player) for (int i = 0; i < b.getCount(); i++) check.add(b.getBrand(i)); for (int i = 0; i < table.getCount(); i++) check.add(table.getBrand(i)); PlayerSort bs = new PlayerSort(check); check = bs.getPlayer; Console.WriteLine("\n�@��: {0}",check.getCount()); printplayer(check,"���s�ˬd"); }