Tarot game: chien/écart stage
- tarot plugin: new methods/signals tarotGamePlayCards, tarotGameShowCards, tarotGameYourTurn - tarot plugin: protocole update - tarot plugin: family renamed in suit - wix: card_game: card can be selected for écart, card move when mouse is over only if it's our turn
This commit is contained in:
parent
2f2a611ba3
commit
71352c7b80
1 changed files with 225 additions and 91 deletions
|
|
@ -50,7 +50,9 @@ class QuickApp():
|
|||
self.bridge.register("roomNewSubject", self.roomNewSubject)
|
||||
self.bridge.register("tarotGameStarted", self.tarotGameStarted)
|
||||
self.bridge.register("tarotGameNew", self.tarotGameNew)
|
||||
self.bridge.register("tarotChooseContrat", self.tarotChooseContrat)
|
||||
self.bridge.register("tarotGameChooseContrat", self.tarotChooseContrat)
|
||||
self.bridge.register("tarotGameShowCards", self.tarotShowCards)
|
||||
self.bridge.register("tarotGameYourTurn", self.tarotMyTurn)
|
||||
self.bridge.register("subscribe", self.subscribe)
|
||||
self.bridge.register("paramUpdate", self.paramUpdate)
|
||||
self.bridge.register("contactDeleted", self.contactDeleted)
|
||||
|
|
@ -291,7 +293,19 @@ class QuickApp():
|
|||
if self.chat_wins.has_key(room_jid):
|
||||
self.chat_wins[room_jid].getGame("Tarot").chooseContrat(xml_data)
|
||||
|
||||
def tarotShowCards(self, room_jid, game_stage, cards, data, profile):
|
||||
if not self.__check_profile(profile):
|
||||
return
|
||||
debug (_("Show cards"))
|
||||
if self.chat_wins.has_key(room_jid):
|
||||
self.chat_wins[room_jid].getGame("Tarot").showCards(game_stage, cards, data)
|
||||
|
||||
def tarotMyTurn(self, room_jid, profile):
|
||||
if not self.__check_profile(profile):
|
||||
return
|
||||
debug (_("My turn to play"))
|
||||
if self.chat_wins.has_key(room_jid):
|
||||
self.chat_wins[room_jid].getGame("Tarot").MyTurn()
|
||||
|
||||
def subscribe(self, type, raw_jid, profile):
|
||||
"""Called when a subsciption management signal is received"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue