Exemplo n.º 1
0
    public object GetGameForPlayers(int userId, int gameID)
    {
        TexasHoldemGame game = gameCenter.getGameById(gameID);

        if (game == null)
        {
            return(null);
        }
        SystemUser user = gameCenter.getUserById(userId);

        if (user == null)
        {
            return(null);
        }
        var joinSpec = game.getGameForPlayer(user);

        if (joinSpec.success)
        {
            return(game);
        }

        return(null);
    }