/// <summary>
        /// Returns the game result.
        /// </summary>
        /// <returns>The game result</returns>
        public ReversiGameResult GetGameResult()
        {
            var gr = new ReversiGameResult();

            for (int i = 0; i < _numRows; i++)
            {
                for (int j = 0; j < _numCols; j++)
                {
                    if (Board[i, j] == MinimaxSpot.Light)
                    {
                        gr.NumLightPieces++;
                    }

                    if (Board[i, j] == MinimaxSpot.Dark)
                    {
                        gr.NumDarkPieces++;
                    }
                }
            }

            if (TerminalTest(Board))
            {
                if (gr.NumLightPieces > gr.NumDarkPieces)
                {
                    gr.GameState = ReversiGameState.LightWon;
                }
                else if (gr.NumLightPieces < gr.NumDarkPieces)
                {
                    gr.GameState = ReversiGameState.DarkWon;
                }
                else
                {
                    gr.GameState = ReversiGameState.Draw;
                }
            }
            else
            {
                gr.GameState = ReversiGameState.Ongoing;
            }

            return(gr);
        }
 static (bool isGameOver, string message, bool result) HandleGameState(
     ReversiGameResult result) =>