public GameBoard(PlayWith symbol)
 {
     InitializeComponent();
     this.symbol = symbol;
     label2.Text = symbol.P1symbol;
     label4.Text = symbol.P2symbol;
 }
예제 #2
0
 private void buttonPlay_Click(object sender, EventArgs e)
 {
     if(comboBox1.SelectedItem.ToString() == comboBox2.SelectedItem.ToString())
     {
         MessageBox.Show("Both Player select same thing.", "Warning",
             MessageBoxButtons.OK,
             MessageBoxIcon.Warning);
     }
     else
     {
         symbol = new PlayWith();
         symbol.P1symbol = comboBox1.SelectedItem.ToString();
         symbol.P2symbol = comboBox2.SelectedItem.ToString();
         this.Hide();
         GameBoard game = new GameBoard(symbol);
         game.Show();
     }
 }