Mercurial > libervia-backend
comparison frontends/quick_frontend/quick_app.py @ 90:4020931569b8
Tarot Game: session initialization
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 23 May 2010 16:39:05 +0930 |
parents | 23caf1051099 |
children | 39c672544593 |
comparison
equal
deleted
inserted
replaced
89:23caf1051099 | 90:4020931569b8 |
---|---|
246 room_jid=room_id+'@'+room_service | 246 room_jid=room_id+'@'+room_service |
247 if self.chat_wins.has_key(room_jid): | 247 if self.chat_wins.has_key(room_jid): |
248 self.chat_wins[room_jid].setSubject(subject) | 248 self.chat_wins[room_jid].setSubject(subject) |
249 debug (_("new subject for room [%(room_jid)s]: %(subject)s") % {'room_jid':room_jid, "subject":subject}) | 249 debug (_("new subject for room [%(room_jid)s]: %(subject)s") % {'room_jid':room_jid, "subject":subject}) |
250 | 250 |
251 def tarotGameStarted(self, room_jid, players, profile): | 251 def tarotGameStarted(self, room_jid, referee, players, profile): |
252 if not self.__check_profile(profile): | 252 if not self.__check_profile(profile): |
253 return | 253 return |
254 debug (_("Tarot Game Started \o/")) | 254 debug (_("Tarot Game Started \o/")) |
255 if self.chat_wins.has_key(room_jid): | 255 if self.chat_wins.has_key(room_jid): |
256 self.chat_wins[room_jid].startGame("Tarot", players) | 256 self.chat_wins[room_jid].startGame("Tarot", referee, players) |
257 debug (_("new Tarot game started in room [%(room_jid)s] with %(players)s") % {'room_jid':room_jid, 'players':[str(player) for player in players]}) | 257 debug (_("new Tarot game started by [%(referee)s] in room [%(room_jid)s] with %(players)s") % {'referee':referee, 'room_jid':room_jid, 'players':[str(player) for player in players]}) |
258 | 258 |
259 def tarotGameNew(self, room_jid, hand, profile): | 259 def tarotGameNew(self, room_jid, hand, profile): |
260 if not self.__check_profile(profile): | 260 if not self.__check_profile(profile): |
261 return | 261 return |
262 debug (_("New Tarot Game")) | 262 debug (_("New Tarot Game")) |
263 print "hand:", hand | 263 print "room: %s, hand: %s" % (room_jid,hand) |
264 if self.chat_wins.has_key(room_jid): | 264 if self.chat_wins.has_key(room_jid): |
265 print "gof:",self.chat_wins[room_jid].getGame("Tarot") | |
265 self.chat_wins[room_jid].getGame("Tarot").newGame(hand) | 266 self.chat_wins[room_jid].getGame("Tarot").newGame(hand) |
266 | 267 |
267 | 268 |
268 | 269 |
269 def subscribe(self, type, raw_jid, profile): | 270 def subscribe(self, type, raw_jid, profile): |