示例#1
0
文件: Tally.cs 项目: billteng/mahjong
 /// <summary>
 /// �]�w���
 /// </summary>
 /// <param name="l">���</param>
 /// <param name="number">�s������</param>
 public void setLocation(Location l, int number)
 {
     this.l = l;
     this.win_count = number;
 }
示例#2
0
 /// <summary>
 /// �������a���X
 /// </summary>
 /// <param name="playernumber">�]�w���h�֭Ӫ��a</param>
 /// <param name="deal">�@�Ӫ��a���h�ֱi</param>
 public AllPlayers(int playernumber, int deal)
 {
     this.players = new BrandPlayer[playernumber];
     this.isPlayer = new bool[playernumber];
     this.lo = new Location();
     this.table = new BrandPlayer();
     this.show_table = new BrandPlayer();
     this.dealnumber = deal;
     this.countplayers = playernumber;
     this.state = (uint)lo.Winer;
     this.brand_count = 0;
     this.basic_tai = Mahjong.Properties.Settings.Default.BasicTai;
     this.one_tai = Mahjong.Properties.Settings.Default.One_Tai;
     this.teamCount = new int[playernumber];
     this.names = new string[playernumber];
     this.showMessageBox = true;
     this.place = new Place();
     for (int i = 0; i < playernumber; i++)
         teamCount[i] = 1;
     money = new int[playernumber];
     setBasicMoney(Mahjong.Properties.Settings.Default.Money);
     win_Times = 1;
     names[0] = Mahjong.Properties.Settings.Default.Player_North;
     names[1] = Mahjong.Properties.Settings.Default.Player_East;
     names[2] = Mahjong.Properties.Settings.Default.Player_South;
     names[3] = Mahjong.Properties.Settings.Default.Player_West;
 }
示例#3
0
        public TallyTest()
        {
            BrandPlayer a = new BrandPlayer();
            a.add(new TubeBrand(1));
            a.add(new TubeBrand(1));
            a.add(new TubeBrand(1));
            a.add(new TubeBrand(1));

            a.add(new RopeBrand(1));
            a.add(new RopeBrand(1));
            a.add(new RopeBrand(1));
            a.add(new RopeBrand(1));

            a.add(new TenThousandBrand(1));
            a.add(new TenThousandBrand(1));
            a.add(new TenThousandBrand(1));
            a.add(new TenThousandBrand(1));

            a.add(new TubeBrand(9));
            a.add(new TubeBrand(9));
            a.add(new TubeBrand(9));
            a.add(new TubeBrand(9));

            a.add(new RopeBrand(9));
            a.add(new RopeBrand(9));
            a.add(new RopeBrand(9));
            a.add(new RopeBrand(9));

            //a.add(new WordBrand(4));
            a.add(new WordBrand(4));
            a.add(new WordBrand(4));

            ////a.add(new WordBrand(1));
            //a.add(new WordBrand(1));
            //a.add(new WordBrand(1));
            //a.add(new WordBrand(1));

            ////a.add(new WordBrand(2));
            //a.add(new WordBrand(2));
            //a.add(new WordBrand(2));
            //a.add(new WordBrand(2));

            ////a.add(new WordBrand(3));
            //a.add(new WordBrand(3));
            //a.add(new WordBrand(3));
            //a.add(new WordBrand(3));

            f = new Tally();

            Location l = new Location();
            AllPlayers all = new AllPlayers(4, 16);
            WordBrand w = new WordBrand(9);
            WordBrand v = new WordBrand(9);
            w.WhoPush = location.East;
            //v.WhoPush = location.Table;
            all.Show_Table.add(w);
            //all.NowPlayer.add(v);

            f.setPlayer(all);
            f.setPlayer(a);
            //l.next_Winer();
            f.setLocation(l,0);

            f.ShowDialog();
        }