Quiz game: buzzer, timer, answer management

This commit is contained in:
Goffi 2011-06-12 22:34:15 +02:00
commit bb255b7a3d

View file

@ -736,7 +736,7 @@ class Tarot():
players_data[player]['played'] = None
if len(game_data['hand'][current_player]) == 0:
#no card lef: the game is finished
to_jid = jid.JID(room_jid.userhost()) #FIXME: gof:
to_jid = room_jid
mess = self.createGameElt(to_jid)
chien_elt = mess.firstChildElement().addChild(self.__give_scores(*self.__calculate_scores(game_data)))
self.host.profiles[profile].xmlstream.send(mess)
@ -750,7 +750,7 @@ class Tarot():
next_player = self.__next_player(game_data)
#finally, we tell to the next player to play
to_jid = jid.JID(room_jid.userhost()+"/"+next_player) #FIXME: gof:
to_jid = jid.JID(room_jid.userhost()+"/"+next_player)
mess = self.createGameElt(to_jid)
yourturn_elt = mess.firstChildElement().addElement('your_turn')
self.host.profiles[profile].xmlstream.send(mess)