Ejemplo n.º 1
0
        // handle a single game that was finished, according to its last game move result
        private eSingleGameFuncResult handleSingleGameFinished(eSingleMoveResult i_LastGameMoveResult)
        {
            eSingleGameFuncResult retSingleGameResult = eSingleGameFuncResult.Finished;

            switch (i_LastGameMoveResult)
            {
            case eSingleMoveResult.Error:
                m_UI.ShowError();
                retSingleGameResult = eSingleGameFuncResult.Finished;
                break;

            case eSingleMoveResult.Ok:
            case eSingleMoveResult.GameOver:
                retSingleGameResult = handleGameOver(m_CurrGameManager);
                break;
            }

            return(retSingleGameResult);
        }
Ejemplo n.º 2
0
        private eSingleMoveResult handleFinishSingleMove(GameManager.eMoveResult i_GameMoveResult)
        {
            eSingleMoveResult retResult = eSingleMoveResult.Ok;

            switch (i_GameMoveResult)
            {
            case GameManager.eMoveResult.BadInput:
            case GameManager.eMoveResult.UnknownFailure:
                retResult = eSingleMoveResult.Error;
                break;

            case GameManager.eMoveResult.GameOver:
                retResult = eSingleMoveResult.GameOver;
                break;

            default:
                retResult = eSingleMoveResult.Ok;
                break;
            }

            return(retResult);
        }