private void button1_Click(object sender, EventArgs e) { TicTac.player1 = textBox1.Text; TicTac.player2 = textBox2.Text; TicTac.FirstPlayer(); if (textBox1.Text == "" || textBox2.Text == "") { MessageBox.Show("Input correct names!"); } else if (TicTac.player1_id == 1) { //Message(TicTac.player1); is_multyp = true; } else if (TicTac.player2_id == 1) { //Message(TicTac.player2); is_multyp = true; } if (is_multyp) { TicTac.is_multyp = true; this.Close(); } }
public void newmp() { Newgame(); TicTac.is_multyp = true; TicTac.iter = 0; label1.Text = null; pictureBox10.Image = null; label3.Text = $"{TicTac.player1_score} : {TicTac.player2_score}"; label1.ForeColor = Color.Black; label2.ForeColor = Color.Black; pictureBox10.Image = null; pictureBox11.Image = null; label2.Text = null; TicTac.mp_sign = 1; pictureBox11.Image = null; TicTac.FirstPlayer(); label1.Text = TicTac.player1; pictureBox10.Image = Image.FromFile($"icons\\packs\\pack{pack_id}\\{TicTac.player1_id}.png"); label2.Text = TicTac.player2; pictureBox11.Image = Image.FromFile($"icons\\packs\\pack{pack_id}\\{TicTac.player2_id}.png"); //sign++; if (TicTac.player1_id == 1) { MP_Message(TicTac.player1); } else if (TicTac.player2_id == 1) { MP_Message(TicTac.player2); } if (TicTac.player1_id == 1) { label1.ForeColor = Color.Red; } else if (TicTac.player2_id == 1) { label2.ForeColor = Color.Red; } }