Mercurial > libervia-backend
diff frontends/quick_frontend/quick_app.py @ 93:2f87651a5ad8
Tarot game: basic trick
- plugin xep-0045: new method getRoomNick
- plugin tarot: basic trick
- wix: played card are shown in CardPanel
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 30 May 2010 15:33:08 +0930 |
parents | 2503de7fb4c7 |
children | be206a3d1a9b |
line wrap: on
line diff
--- a/frontends/quick_frontend/quick_app.py Sat May 29 20:53:03 2010 +0930 +++ b/frontends/quick_frontend/quick_app.py Sun May 30 15:33:08 2010 +0930 @@ -53,6 +53,7 @@ self.bridge.register("tarotGameChooseContrat", self.tarotChooseContrat) self.bridge.register("tarotGameShowCards", self.tarotShowCards) self.bridge.register("tarotGameYourTurn", self.tarotMyTurn) + self.bridge.register("tarotGameCardsPlayed", self.tarotCardsPlayed) self.bridge.register("subscribe", self.subscribe) self.bridge.register("paramUpdate", self.paramUpdate) self.bridge.register("contactDeleted", self.contactDeleted) @@ -306,7 +307,14 @@ debug (_("My turn to play")) if self.chat_wins.has_key(room_jid): self.chat_wins[room_jid].getGame("Tarot").MyTurn() - + + def tarotCardsPlayed(self, room_jid, player, cards, profile): + if not self.__check_profile(profile): + return + debug (_("Card(s) played (%(player)s): %(cards)s") % {"player":player, "cards":cards}) + if self.chat_wins.has_key(room_jid): + self.chat_wins[room_jid].getGame("Tarot").cardsPlayed(player, cards) + def subscribe(self, type, raw_jid, profile): """Called when a subsciption management signal is received""" if not self.__check_profile(profile):