private int PlayerMove(TicTacToeMain game) { int playerInput = game._inputDelegate(); while (game.IsGameArrayElementTaken(playerInput)) { playerInput = game._inputDelegate(); } return(playerInput); }
private int CPUMoveEasy(TicTacToeMain game) { Random rnd = new Random(); int cpuMove = rnd.Next(1, 10); while (game.IsGameArrayElementTaken(cpuMove)) { cpuMove = rnd.Next(1, 10); } return(cpuMove); }