Tarot game:
- draw game managed - we can now play continuously \o/
This commit is contained in:
parent
80327010ed
commit
2ff3e80b08
1 changed files with 63 additions and 10 deletions
|
|
@ -105,7 +105,16 @@ class CardPanel(QuickCardGame,wx.Panel):
|
|||
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()
|
||||
self.Refresh()
|
||||
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})
|
||||
|
||||
def cardsPlayed(self, player, cards):
|
||||
"""A card has been played by player"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue