Пример #1
0
        public void Play()
        {
            presenter.Banner();
            presenter.DrawBoard(board);
            bool isOver = false;

            while (!isOver)
            {
                foreach (var player in players)
                {
                    int[] position = PlayerTurn(player);
                    board[position[0], position[1]] = player;
                    presenter.DrawBoard(board);

                    isOver = finalizer.GameIsWon(board, player) || finalizer.BoardIsFilled(board);
                    if (isOver)
                    {
                        break;
                    }
                }
            }

            presenter.Ending();
        }