Пример #1
0
        public void PlaceMark()
        {
            GameOutcome gameOutcome = new GameOutcome();

            winner = gameOutcome.IsItWin();
            if (winner != 1)
            {
                choice = int.Parse(Console.ReadLine());
                if (arr[choice - 1] != 'X' && arr[choice - 1] != 'O')
                {
                    if (player % 2 == 0)
                    {
                        arr[choice - 1] = 'O';
                        player++;
                    }
                    else
                    {
                        arr[choice - 1] = 'X';
                        player++;
                    }
                }
            }
            else
            {
                gameOutcome.WhicePlayerWon();
                arr = defaultArr;
            }
        }