Mercurial > libervia-backend
comparison 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 |
comparison
equal
deleted
inserted
replaced
92:2503de7fb4c7 | 93:2f87651a5ad8 |
---|---|
51 self.bridge.register("tarotGameStarted", self.tarotGameStarted) | 51 self.bridge.register("tarotGameStarted", self.tarotGameStarted) |
52 self.bridge.register("tarotGameNew", self.tarotGameNew) | 52 self.bridge.register("tarotGameNew", self.tarotGameNew) |
53 self.bridge.register("tarotGameChooseContrat", self.tarotChooseContrat) | 53 self.bridge.register("tarotGameChooseContrat", self.tarotChooseContrat) |
54 self.bridge.register("tarotGameShowCards", self.tarotShowCards) | 54 self.bridge.register("tarotGameShowCards", self.tarotShowCards) |
55 self.bridge.register("tarotGameYourTurn", self.tarotMyTurn) | 55 self.bridge.register("tarotGameYourTurn", self.tarotMyTurn) |
56 self.bridge.register("tarotGameCardsPlayed", self.tarotCardsPlayed) | |
56 self.bridge.register("subscribe", self.subscribe) | 57 self.bridge.register("subscribe", self.subscribe) |
57 self.bridge.register("paramUpdate", self.paramUpdate) | 58 self.bridge.register("paramUpdate", self.paramUpdate) |
58 self.bridge.register("contactDeleted", self.contactDeleted) | 59 self.bridge.register("contactDeleted", self.contactDeleted) |
59 self.bridge.register("updatedValue", self.updatedValue, "request") | 60 self.bridge.register("updatedValue", self.updatedValue, "request") |
60 self.bridge.register("askConfirmation", self.askConfirmation, "request") | 61 self.bridge.register("askConfirmation", self.askConfirmation, "request") |
304 if not self.__check_profile(profile): | 305 if not self.__check_profile(profile): |
305 return | 306 return |
306 debug (_("My turn to play")) | 307 debug (_("My turn to play")) |
307 if self.chat_wins.has_key(room_jid): | 308 if self.chat_wins.has_key(room_jid): |
308 self.chat_wins[room_jid].getGame("Tarot").MyTurn() | 309 self.chat_wins[room_jid].getGame("Tarot").MyTurn() |
309 | 310 |
311 def tarotCardsPlayed(self, room_jid, player, cards, profile): | |
312 if not self.__check_profile(profile): | |
313 return | |
314 debug (_("Card(s) played (%(player)s): %(cards)s") % {"player":player, "cards":cards}) | |
315 if self.chat_wins.has_key(room_jid): | |
316 self.chat_wins[room_jid].getGame("Tarot").cardsPlayed(player, cards) | |
317 | |
310 def subscribe(self, type, raw_jid, profile): | 318 def subscribe(self, type, raw_jid, profile): |
311 """Called when a subsciption management signal is received""" | 319 """Called when a subsciption management signal is received""" |
312 if not self.__check_profile(profile): | 320 if not self.__check_profile(profile): |
313 return | 321 return |
314 entity = JID(raw_jid) | 322 entity = JID(raw_jid) |