Tarot Game: session initialization
This commit is contained in:
parent
6cfa6a1413
commit
6b1d48c456
1 changed files with 139 additions and 47 deletions
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue