Пример #1
0
    internal void ActionFold(ClientInfo clientInfo)
    {
        Debug.Log($"{clientInfo.PlayerUsername} Calling ActionFold");
        TakeTurnRequest req = new TakeTurnRequest
        {
            ClientInfo   = clientInfo,
            PlayerAction = PlayerAction.Fold,
        };

        try
        {
            _client.TakeTurn(req);
        }
        catch (RpcException ex)
        {
            throw new InvalidTurnException(ex.ToString());
        }
    }
Пример #2
0
    // ActionBet used for Raise
    internal void ActionBet(ClientInfo clientInfo, long amount)
    {
        Debug.Log($"{clientInfo.PlayerUsername} Calling ActionBet ({amount})");
        TakeTurnRequest req = new TakeTurnRequest
        {
            ClientInfo   = clientInfo,
            PlayerAction = PlayerAction.Bet,
            ActionOpts   = new ActionOpts {
                BetAmount = amount
            }
        };

        try
        {
            _client.TakeTurn(req);
        }
        catch (RpcException ex)
        {
            throw new InvalidTurnException(ex.ToString());
        }
    }