diff 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
line wrap: on
line diff
--- a/frontends/quick_frontend/quick_app.py	Thu May 13 16:27:48 2010 +0930
+++ b/frontends/quick_frontend/quick_app.py	Sun May 23 16:39:05 2010 +0930
@@ -248,20 +248,21 @@
             self.chat_wins[room_jid].setSubject(subject)
             debug (_("new subject for room [%(room_jid)s]: %(subject)s") % {'room_jid':room_jid, "subject":subject})
     
-    def tarotGameStarted(self, room_jid, players, profile):
+    def tarotGameStarted(self, room_jid, referee, players, profile):
         if not self.__check_profile(profile):
             return
         debug  (_("Tarot Game Started \o/"))
         if self.chat_wins.has_key(room_jid):
-            self.chat_wins[room_jid].startGame("Tarot", players)
-            debug (_("new Tarot game started in room [%(room_jid)s] with %(players)s") % {'room_jid':room_jid, 'players':[str(player) for player in players]})
+            self.chat_wins[room_jid].startGame("Tarot", referee, players)
+            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]})
        
     def tarotGameNew(self, room_jid, hand, profile):
         if not self.__check_profile(profile):
             return
         debug (_("New Tarot Game"))
-        print "hand:", hand
+        print "room: %s, hand: %s" % (room_jid,hand)
         if self.chat_wins.has_key(room_jid):
+            print "gof:",self.chat_wins[room_jid].getGame("Tarot")
             self.chat_wins[room_jid].getGame("Tarot").newGame(hand)