Tarot game:

- draw game managed
- we can now play continuously \o/
This commit is contained in:
Goffi 2011-05-23 00:46:51 +02:00
commit 2ff3e80b08

View file

@ -274,7 +274,17 @@ class CardGame(QuickCardGame,urwid.WidgetWrap):
def showScores(self, xml_data, winners, loosers):
"""Called when the player as to select hist contrat
@param xml_data: SàT xml representation of the form"""
form = XMLUI(self.parent.host, xml_data, title = _('You win \o/') if self.player_nick in winners else _('You loose :('), options = ['NO_CANCEL'])
def _new_game(ignore):
self.resetRound()
for location in ['top','left','bottom','right']:
self.table.putCard(location, None)
self.parent.host.redraw()
self.parent.host.bridge.tarotGameReady(self.player_nick, self.referee, profile_key = self.parent.host.profile)
if not winners and not loosers:
title = _("Draw game")
else:
title = _('You win \o/') if self.player_nick in winners else _('You loose :(')
form = XMLUI(self.parent.host, xml_data, title = title, options = ['NO_CANCEL'], misc={'callback':_new_game})
form.show()
def invalidCards(self, phase, played_cards, invalid_cards):