Highlight
unknown
c_cpp
2 years ago
2.0 kB
5
Indexable
Never
static void Main(string[] args) { Program some = new Program(); some.askForNumber(); some.createArray(); some.avoidImposible(); do { some.checkWin(); some.computerGuessNumber++; some.selectArrayItem(); some.checkForCorrectness(); foreach (int i in some.list) { if (some.list[some.arrayItemPick] != 0) { some.firstOne = some.list[some.arrayItemPick]; some.value = some.Function(some.firstOne, i, some.cInput1int, some.cInput2int); if (some.value == false) { some.list[i] = 0; Console.WriteLine("eliminating " + some.list[i]); } if (some.cInput1int == 4) { win_ = true; } Console.WriteLine("cInput1int: " + some.cInput1int + " cInput2int: " + some.cInput2int + " player number: " + some.playerNumber + " value: " + some.value + " arrayItemPick: " + some.arrayItemPick + " some.firstone: " + some.list[some.arrayItemPick]); Console.WriteLine(some.arrayItemPick + " " + some.list[some.arrayItemPick]); Console.WriteLine(some.list[1935]); } } } while (win_ is false); } public void selectArrayItem() { arrayItemPick = rnd.Next(0, list.Length); if (list[arrayItemPick] != 0) { Console.WriteLine(list[arrayItemPick]); } else { selectArrayItem(); } }