Example #1
0
        private void ManChoi(int round, int soMang, string name)//màn chơi
        {
            switch (round)
            {
            case 10:
                Play1 pl1 = new Play1(soMang, name, round, soundMode);      //số mạng,tên, và số điểm
                Scene(pl1);
                break;

            case 20:
                Play2 pl2 = new Play2(soMang, name, round, soundMode);
                Scene(pl2);
                break;

            case 30:
                Play3 pl3 = new Play3(soMang, name, round, soundMode);
                Scene(pl3);
                break;

            case 40:
                Play4 pl4 = new Play4(soMang, name, round, soundMode);
                Scene(pl4);
                break;

            case 50:
                Play5 pl5 = new Play5(soMang, name, round, soundMode);
                Scene(pl5);
                break;

            case 60:
                Play6 pl6 = new Play6(soMang, name, round, soundMode);
                Scene(pl6);
                break;

            case 70:
                Play7 pl7 = new Play7(soMang, name, round, soundMode);
                Scene(pl7);
                break;

            case 80:
                Play8 pl8 = new Play8(soMang, name, round, soundMode);
                Scene(pl8);
                break;

            case 90:
                Play9 pl9 = new Play9(soMang, name, round, soundMode);
                Scene(pl9);
                break;

            case 100:
                Play10 pl10 = new Play10(soMang, name, round, soundMode);
                Scene(pl10);
                break;

            default:
                EndGame eg = new EndGame(name, soundMode);
                Scene(eg);
                break;
            }
        }
Example #2
0
        private void bRes_Click(object sender, EventArgs e)  //restart
        {
            DialogResult dlr = MessageBox.Show("Do you want to restart?", "Restart", MessageBoxButtons.YesNo);

            if (dlr == DialogResult.Yes)   //đồng ý thì reset lại màn chơi
            {
                this.Hide();
                Play2 play = new Play2(surNum, name, point);
                play.ShowDialog();
                this.Close();
            }
        }
Example #3
0
        private void ManChoi(int round, int soMang, string name)//màn chơi
        {
            switch (round)
            {
            case 10:
                Play1 pl1 = new Play1(soMang, name, round);       //số mạng,tên, và số điểm
                Scene(pl1);
                break;

            case 20:
                Play2 pl2 = new Play2(soMang, name, round);
                Scene(pl2);
                break;

            case 30:
                Play3 pl3 = new Play3(soMang, name, round);
                Scene(pl3);
                break;

            case 40:
                Play4 pl4 = new Play4(soMang, name, round);
                Scene(pl4);
                break;

            case 50:
                Play5 pl5 = new Play5(soMang, name, round);
                Scene(pl5);
                break;

            case 60:
                Play6 pl6 = new Play6(soMang, name, round);
                Scene(pl6);
                break;

            case 70:
                Play7 pl7 = new Play7(soMang, name, round);
                Scene(pl7);
                break;
                //case 80:
                //     Play8 pl8 = new Play8(soMang, name, round);
                //     Scene(pl8);
                //     break;
            }
        }