예제 #1
0
        public bool CheckIfGameIsOver()
        {
            // Check for winners or ties
            bool isThereAWinner = logic.CheckForAWinner();

            if (isThereAWinner)
            {
                Console.WriteLine("WINNER: Computer!");
                // No need to write code for WINNER: User, because that won't happen ;-)
                gameContinues = false;
                return(true);
            }

            if (logic.BoardIsFull())
            {
                Console.WriteLine("Well played. Looks like we tied");
                gameContinues = false;
                return(true);
            }
            return(false);
        }