private void button2_Click(object sender, EventArgs e) { if (textBox3.Text == "") { textBox3.Text = "0"; } //Хочет ли робот поднять ставку? //Yes // if ((Result.Text.IndexOf("PC WIN") >= 0) || (Result.Text.IndexOf("NO ONE WIN!") >= 0) || (Result.Text == "")) if (Convert.ToInt32(RobotHelp.Text) > 20) { textBox3.Text = Convert.ToString(Convert.ToInt32(numericUpDown1.Value.ToString()) + Convert.ToInt32(textBox3.Text) + Convert.ToInt32(numericUpDown2.Value.ToString())); textBox2.Text = Convert.ToString(Convert.ToInt32(textBox2.Text) - Convert.ToInt32(numericUpDown1.Value.ToString())); textBox1.Text = Convert.ToString(Convert.ToInt32(textBox1.Text) - Convert.ToInt32(numericUpDown1.Value.ToString())); numericUpDown1.Value = numericUpDown1.Minimum; numericUpDown2.Value = numericUpDown2.Minimum; } else { DealCards.getDeal().Fold("Robot"); } Button mybuttonCall = Controls.Find("TernButton", true).FirstOrDefault() as Button; mybuttonCall.Enabled = true; mybuttonCall = Controls.Find("FlopButton", true).FirstOrDefault() as Button; mybuttonCall.Enabled = true; mybuttonCall = Controls.Find("RiverButton", true).FirstOrDefault() as Button; mybuttonCall.Enabled = true; //No //Higher }
private void RiverButton_Click(object sender, EventArgs e) { FlopButton.Visible = true; RiverButton.Visible = false; TernButton.Visible = false; DealCards.getDeal().getRiver(); }
private void button1_Click(object sender, EventArgs e) { FlopButton.Visible = false; TernButton.Visible = true; if (textBox3.Text == "") { textBox3.Text = "0"; } textBox3.Text = Convert.ToString(Convert.ToInt32(numericUpDown1.Value.ToString()) + Convert.ToInt32(textBox3.Text) + Convert.ToInt32(numericUpDown2.Value.ToString())); textBox2.Text = Convert.ToString(Convert.ToInt32(textBox2.Text) - Convert.ToInt32(numericUpDown1.Value.ToString())); textBox1.Text = Convert.ToString(Convert.ToInt32(textBox1.Text) - Convert.ToInt32(numericUpDown1.Value.ToString())); numericUpDown1.Value = numericUpDown1.Minimum; numericUpDown2.Value = numericUpDown2.Minimum; DealCards.createDeal(); DealCards.getDeal().setControl(Controls); // DealCards.getDeal().setComponents(components); DealCards.getDeal().Deal(); }
private void button3_Click(object sender, EventArgs e) { DealCards.getDeal().Fold("Player"); //Fold:: //DealCards.getDeal().myResult =new Fold(); }