Exemple #1
0
 //EDIT -> NAME -> PLAYER 2
 private void player2ToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     if (gameMode == 0)
     {
         NameList nameList = new NameList();
         nameList.ShowDialog();
         // while (NameList.ActiveForm.Activated == 1) { }
         if (player2Name != NameList.getName())          //RESET SCORE IF NEW PLAYER NAME
             score2 = 0;
         player2Name = NameList.getName();
         p2ScoreLbl.Text = player2Name + "'s Score:";
     }
     else MessageBox.Show("Wrong game mode selected.\n" +
                          "Select Player vs Player to add Player 2");
 }
Exemple #2
0
 //EDIT -> NAME -> PLAYER 1
 private void player1ToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     NameList nameList = new NameList();
     nameList.ShowDialog();
        // while (NameList.ActiveForm.Activated == 1) { }
     if (player1Name != NameList.getName())          //RESET SCORE IF NEW PLAYER NAME
         score1 = 0;
     player1Name = NameList.getName();
     p1ScoreLbl.Text = player1Name + "'s Score:";
 }