예제 #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     textBox1.Text += refe.CurrentPlayer().GetName() + " Reject \r\n";
     if (refe.Rejected(refe.CurrentPlayer().GetHand()[listBox1.SelectedIndex]))
     {
         Draw();
         textBox1.Text += refe.CurrentPlayer().GetName() + " Play Free " + refe.GetNumberFreeTile().ToString() + "\r\n";
         List <Mahjong.Plugin.IReferee.m_rulepossibility> tmp = refe.GetRulesPossibilities(refe.CurrentPlayer());
         button2.Enabled = false;
         button5.Enabled = false;
         for (int i = 0; i < tmp.Count; i++)
         {
             textBox1.Text += tmp[i].Rule.GetName() + " : " + tmp[i].Player.GetName();
             if (tmp[i].Rule.GetName() == "Pong")
             {
                 button2.Enabled = true;
             }
             if (tmp[i].Rule.GetName() == "Kong")
             {
                 button5.Enabled = true;
             }
         }
     }
 }