private void pcguess() { richTextBox1.Text += "\n==========="; PcGuess.pcGuess(int.Parse(positiveBox.Text), int.Parse(negativeBox.Text), ref answers, PcGuess.guess(answers), ANSWER_SIZE); if (answers.Count > 1) { richTextBox1.Text += String.Format("\nMy guess is {0}. If it is wrong, can you give me clue ?", PcGuess.guess(answers)); } else if (answers.Count == 1) { richTextBox1.Text += String.Format("\nOleyyy! I Won. The number in your mind is {0}!\nThe number I kept was {1}", answers[0], string.Join("", pcSayi)); MessageBox.Show("I WON ! hahahhah :)))"); } else if (answers.Count < 1) { richTextBox1.Text += "\nImpossible answer for the clues you gave."; } }
public StartGameForm(Form3 form3) { InitializeComponent(); this.form3 = form3; //user tahmin etme int[] nums = new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 }; int[] randomNum = new int[4]; //pcSayi UserGuess.sayilariKar(ref nums); //binler basamağı 0 olamaz Array.Copy(nums, randomNum, 4); pcSayi = randomNum; richTextBox1.Text = String.Format("My guess is {0}. If it is wrong, can you give me a few clue ?", PcGuess.guess(answers)); }