Mercurial > libervia-web
comparison browser_side/card_game.py @ 334:9c6be29c714a
browser side: removed logging imports: it's not working correctly with pyjamas
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 04 Feb 2014 16:49:20 +0100 |
parents | aebb96bfa8d1 |
children | 2067d6241927 |
comparison
equal
deleted
inserted
replaced
333:c01397d18026 | 334:9c6be29c714a |
---|---|
41 from dialog import ConfirmDialog, InfoDialog | 41 from dialog import ConfirmDialog, InfoDialog |
42 from tools import html_sanitize | 42 from tools import html_sanitize |
43 from datetime import datetime | 43 from datetime import datetime |
44 from time import time | 44 from time import time |
45 from sat_frontends.tools.games import TarotCard | 45 from sat_frontends.tools.games import TarotCard |
46 from logging import error | |
47 import re | 46 import re |
48 | 47 |
49 | 48 |
50 CARD_WIDTH = 74 | 49 CARD_WIDTH = 74 |
51 CARD_HEIGHT = 136 | 50 CARD_HEIGHT = 136 |
306 if phase == "play": | 305 if phase == "play": |
307 self.state = "play" | 306 self.state = "play" |
308 elif phase == "ecart": | 307 elif phase == "ecart": |
309 self.state = "ecart" | 308 self.state = "ecart" |
310 else: | 309 else: |
311 error('INTERNAL ERROR: unmanaged game phase') | 310 print 'INTERNAL ERROR: unmanaged game phase' |
312 | 311 |
313 for suit, value in played_cards: | 312 for suit, value in played_cards: |
314 self.hand.append(self.cards[(suit, value)]) | 313 self.hand.append(self.cards[(suit, value)]) |
315 | 314 |
316 self.hand.sort() | 315 self.hand.sort() |