public void getFlop() { Label RobotCombo = Control.Find("label9", true).FirstOrDefault() as Label; RobotCombo.Visible = false; DrawCards.VisibleCards(); ShuffleCards(); getHand(); // for player & PC 3 4 5 for (int i = 2; i < 5; i++) { playerHand[i] = getDeck[i + 2];// pcHand[i] = new Card { MySuit = getDeck[i + 2].MySuit, MyValue = getDeck[i + 2].MyValue, count = 0 }; Dilir[i - 2] = new Card { MySuit = getDeck[i + 2].MySuit, MyValue = getDeck[i + 2].MyValue, count = 0 };; // 1 2 3 } displayCardsPlayers(); for (int i = 5; i < 8; i++) { DrawCards.DrawCardSuitValue(Dilir[i - 5], i, this); // 1 2 3 } sortCards(); evaluateHands(); RobotCall(); }
public void Result() { if (who == "Player") { TextBox PCTexB = Control.Find("textBox2", true).FirstOrDefault() as TextBox; TextBox AllTexB = Control.Find("textBox3", true).FirstOrDefault() as TextBox; if (AllTexB.Text == "") { AllTexB.Text = "0"; } PCTexB.Text = Convert.ToString(Convert.ToInt32(PCTexB.Text) + Convert.ToInt32(AllTexB.Text)); Button flopbutton = Control.Find("FlopButton", true).FirstOrDefault() as Button; Button TernButton = Control.Find("TernButton", true).FirstOrDefault() as Button; Button RiverButton = Control.Find("RiverButton", true).FirstOrDefault() as Button; AllTexB.Text = ""; flopbutton.Enabled = true; flopbutton.Visible = true; TernButton.Visible = false; RiverButton.Visible = false; // fold = true; DrawCards.VisibleCards(); } else if (who == "Robot") { TextBox PlayerTexB = Control.Find("textBox1", true).FirstOrDefault() as TextBox; TextBox AllTexB = Control.Find("textBox3", true).FirstOrDefault() as TextBox; if (AllTexB.Text == "") { AllTexB.Text = "0"; } PlayerTexB.Text = Convert.ToString(Convert.ToInt32(PlayerTexB.Text) + Convert.ToInt32(AllTexB.Text)); Button flopbutton = Control.Find("FlopButton", true).FirstOrDefault() as Button; Button TernButton = Control.Find("TernButton", true).FirstOrDefault() as Button; Button RiverButton = Control.Find("RiverButton", true).FirstOrDefault() as Button; AllTexB.Text = ""; flopbutton.Enabled = true; flopbutton.Visible = true; TernButton.Visible = false; RiverButton.Visible = false; // fold = true; DrawCards.VisibleCards(); } }