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:
Goffi 2010-05-29 20:53:03 +09:30
commit 71352c7b80

View file

@ -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"""