diff frontends/wix/card_game.py @ 95:be206a3d1a9b

Tarot game: score calculation - plugin tarot: score validity is now checked (some of attackers and defender must equal 91) - plugin tarot: new signal tarotGameScore to give the scores and winners/loosers - wix: score are now displayed at the end of the game - xml_tools: 'fixed' type is now managed in dataForm2xml
author Goffi <goffi@goffi.org>
date Wed, 02 Jun 2010 15:57:23 +0930
parents 1eb5ccead43c
children 01d7bd6f0e86
line wrap: on
line diff
--- a/frontends/wix/card_game.py	Tue Jun 01 18:16:15 2010 +0930
+++ b/frontends/wix/card_game.py	Wed Jun 02 15:57:23 2010 +0930
@@ -174,7 +174,20 @@
         if self.state == "chien":
             self.to_show = []
         self.state = "play"
+
+        #tmp gof: FIXME
+        card = self.hand[-1]
+        self.parent.host.bridge.tarotGamePlayCards(self.player_nick, self.referee, [(card.suit, card.value)], profile_key = self.parent.host.profile)
+        del self.hand[-1]
+        self.state = "wait"
+        self._recalc_ori()
+        self.Refresh()
     
+    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 = Form(self.parent.host, xml_data, title = _('You win \o/') if self.player_nick in winners else _('You loose :('), options = ['NO_CANCEL'])
+
     def cardsPlayed(self, player, cards):
         """A card has been played by player"""
         if self.to_show: