Mercurial > libervia-backend
comparison frontends/wix/card_game.py @ 162:ae50b53ff868
misc Tarot fixes
- wix, primitivus, quick_frontend: autoplay fonction is activated by changing self._autoplay from None to 0 in quick card game
- primitivus: added forgotten import of log methods
- primitivus: fix bad selected color for notification messages
- primitivus: score are now shown
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 06 Aug 2010 12:18:50 +0800 |
parents | 74aaf230a7c3 |
children | fd2db62ea5eb |
comparison
equal
deleted
inserted
replaced
161:c37826d80f2a | 162:ae50b53ff868 |
---|---|
119 @param invalid_cards: cards which are invalid""" | 119 @param invalid_cards: cards which are invalid""" |
120 QuickCardGame.invalidCards(self, phase, played_cards, invalid_cards) | 120 QuickCardGame.invalidCards(self, phase, played_cards, invalid_cards) |
121 | 121 |
122 self._recalc_ori() | 122 self._recalc_ori() |
123 self.Refresh() | 123 self.Refresh() |
124 wx.MessageDialog(self, _("Cards played are invalid !"), _("Error"), wx.OK | wx.ICON_ERROR).ShowModal() | 124 if self._autoplay==None: #No dialog if there is autoplay |
125 wx.MessageDialog(self, _("Cards played are invalid !"), _("Error"), wx.OK | wx.ICON_ERROR).ShowModal() | |
125 | 126 |
126 def _is_on_hand(self, pos_x, pos_y): | 127 def _is_on_hand(self, pos_x, pos_y): |
127 """Return True if the coordinate are on the hand cards""" | 128 """Return True if the coordinate are on the hand cards""" |
128 if pos_x > self.orig_x and pos_y > self.orig_y \ | 129 if pos_x > self.orig_x and pos_y > self.orig_y \ |
129 and pos_x < self.orig_x + (len(self.hand)+1) * self.visible_size \ | 130 and pos_x < self.orig_x + (len(self.hand)+1) * self.visible_size \ |