pokerthproto.protocol module¶
The PokerTH protocol consisting of messages and replies with respect to the current state in the communication.
-
class
pokerthproto.protocol.
ClientProtocol
[source]¶ Bases:
pokerthproto.protocol.PokerTHProtocol
-
handleChat
(chatType, text, lobbyInfo, gameInfo=None, playerInfo=None)[source]¶ Handle the behavior of our client when a chat message was received.
Overwrite this method.
Parameters:
-
handleEndOfGame
(gameInfo, winner)[source]¶ Handle the end of a game
The end of a game brings you back to the lobby
Parameters:
-
handleEndOfHand
(gameInfo)[source]¶ Handle the end of a hand
Parameters: gameInfo – game information ( Game
)
-
handleInsideLobby
(lobbyInfo)[source]¶ Handle the behavior of our client in the lobby.
Overwrite this method.
Parameters: lobbyInfo – information about the lobby ( Lobby
)
-
handleMyTurn
(gameInfo)[source]¶ Decide what action to take when it is our turn.
Parameters: gameInfo – game information ( Game
)
-
handleOthersTurn
(playerInfo, gameInfo)[source]¶ Handle the start of another player’s turn.
Parameters:
-
sendChatRequest
(text, gameId=None, playerId=None)[source]¶ Send a chat message.
Parameters: - text – your message
- gameId – optional game id
- playerId – optional player id
-
sendMyAction
(action, bet, relative=True)[source]¶ Send my action during a poker game.
Parameters: - action – action of
Action
- bet – bet with respect to the action
- relative – boolean if the bet is relative to the highest set bet
- action – action of
-
state
= 0¶
-
-
class
pokerthproto.protocol.
ClientProtocolFactory
(nickName)[source]¶ Bases:
twisted.internet.protocol.ClientFactory
-
protocol
¶ alias of
ClientProtocol
-
-
class
pokerthproto.protocol.
PokerTHProtocol
[source]¶ Bases:
twisted.internet.protocol.Protocol
-
adminBanPlayerAckReceived
(msg)¶
-
adminBanPlayerReceived
(msg)¶
-
adminRemoveGameAckReceived
(msg)¶
-
adminRemoveGameReceived
(msg)¶
-
afterHandShowCardsReceived
(msg)¶
-
allInShowCardsReceived
(msg)¶
-
announceReceived
(msg)¶
-
askKickDeniedReceived
(msg)¶
-
askKickPlayerReceived
(msg)¶
-
authClientResponseReceived
(msg)¶
-
authServerChallengeReceived
(msg)¶
-
authServerVerificationReceived
(msg)¶
-
avatarDataReceived
(msg)¶
-
avatarEndReceived
(msg)¶
-
avatarHeaderReceived
(msg)¶
-
avatarRequestReceived
(msg)¶
-
chatReceived
(msg)¶
-
chatRejectReceived
(msg)¶
-
chatRequestReceived
(msg)¶
-
dealFlopCardsReceived
(msg)¶
-
dealRiverCardReceived
(msg)¶
-
dealTurnCardReceived
(msg)¶
-
dialogReceived
(msg)¶
-
endKickPetitionReceived
(msg)¶
-
endOfGameReceived
(msg)¶
-
endOfHandHideCardsReceived
(msg)¶
-
endOfHandShowCardsReceived
(msg)¶
-
errorReceived
(msg)¶
-
gameAdminChangedReceived
(msg)¶
-
gameListAdminChangedReceived
(msg)¶
-
gameListNewReceived
(msg)¶
-
gameListPlayerJoinedReceived
(msg)¶
-
gameListPlayerLeftReceived
(msg)¶
-
gameListSpectatorJoinedReceived
(msg)¶
-
gameListSpectatorLeftReceived
(msg)¶
-
gameListUpdateReceived
(msg)¶
-
gamePlayerJoinedReceived
(msg)¶
-
gamePlayerLeftReceived
(msg)¶
-
gameSpectatorJoinedReceived
(msg)¶
-
gameSpectatorLeftReceived
(msg)¶
-
gameStartInitialReceived
(msg)¶
-
gameStartRejoinReceived
(msg)¶
-
handStartReceived
(msg)¶
-
initAckReceived
(msg)¶
-
initReceived
(msg)¶
-
inviteNotifyReceived
(msg)¶
-
invitePlayerToGameReceived
(msg)¶
-
joinExistingGameReceived
(msg)¶
-
joinGameAckReceived
(msg)¶
-
joinGameFailedReceived
(msg)¶
-
joinNewGameReceived
(msg)¶
-
kickPetitionUpdateReceived
(msg)¶
-
kickPlayerRequestReceived
(msg)¶
-
leaveGameRequestReceived
(msg)¶
-
myActionRequestReceived
(msg)¶
-
playerIdChangedReceived
(msg)¶
-
playerInfoReplyReceived
(msg)¶
-
playerInfoRequestReceived
(msg)¶
-
playerListReceived
(msg)¶
-
playersActionDoneReceived
(msg)¶
-
playersTurnReceived
(msg)¶
-
rejectGameInvitationReceived
(msg)¶
-
rejectInvNotifyReceived
(msg)¶
-
rejoinExistingGameReceived
(msg)¶
-
removedFromGameReceived
(msg)¶
-
reportAvatarAckReceived
(msg)¶
-
reportAvatarReceived
(msg)¶
-
reportGameAckReceived
(msg)¶
-
reportGameReceived
(msg)¶
-
resetTimeoutReceived
(msg)¶
-
showMyCardsRequestReceived
(msg)¶
-
startEventAckReceived
(msg)¶
-
startEventReceived
(msg)¶
-
startKickPetitionReceived
(msg)¶
-
statisticsReceived
(msg)¶
-
subscriptionRequestReceived
(msg)¶
-
timeoutWarningReceived
(msg)¶
-
unknownAvatarReceived
(msg)¶
-
voteKickReplyReceived
(msg)¶
-
voteKickRequestReceived
(msg)¶
-
yourActionRejectedReceived
(msg)¶
-