JitMang
JitMang
CC#
Created by JitMang on 2/14/2023 in #help
❔ Tic Tac Toe
private void ComputerAI() { Button[] buttons = new Button[] { button1, button2, button3, button4, button5, button6, button7, button8, button9 }; Button move = null; int randomNumber; do { randomNumber = random.Next(0, 9); move = buttons[randomNumber]; } while (move.Enabled == false); move.Text = "O"; move.Enabled = false; PlayerTurn = !PlayerTurn; TurnCount++;
3 replies