Esempio n. 1
0
        }//c-tor

        #endregion

        /// <summary>
        ///Play a game
        /// </summary>
        public void Play()
        {
            UIManager.PrintHeader();//show header
            Move newMove;

            do
            {
                do
                {
                    UIManager.PrintEmptyBoard(_board.GameBoard);              //show help game board
                    newMove = CurrentPlayer.MakeMove(_board);                 // player make new move
                } while (!_board.SetMove(newMove, CurrentPlayer.PlayerSign)); //until move is located
                _moves.Push(newMove);                                         //save move
                _board.Check(CurrentPlayer.PlayerSign);                       //chack for game is over
            } while (_state == State.CONTINUE);                               //while game state is continue
        }//Play