private void player2CheckBox_click(object sender, EventArgs e)
 {
     if (Player2CheckBox.Checked)
     {
         Player2TextBox.Enabled = true;
         m_OneHumanPlayer       = false;
         Player2TextBox.Clear();
     }
     else
     {
         m_OneHumanPlayer       = true;
         Player2TextBox.Text    = "Computer";
         Player2TextBox.Enabled = false;
     }
 }
Example #2
0
        private void AgainstButton_Click(object sender, EventArgs e)
        {
            Button theSender = sender as Button;

            if (theSender.Text == "Against a Friend")
            {
                AgainstButton.Text = "Against Computer";
                Player2TextBox.Clear();
                Player2TextBox.Enabled = true;
            }
            else
            {
                AgainstButton.Text     = "Against a Friend";
                Player2TextBox.Text    = "-computer-";
                Player2TextBox.Enabled = false;
            }
        }