Tarot Game: session initialization

This commit is contained in:
Goffi 2010-05-23 16:39:05 +09:30
commit 6b1d48c456

View file

@ -248,20 +248,21 @@ class QuickApp():
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)