comparison frontends/src/quick_frontend/quick_card_game.py @ 1009:d1084f7e56a5

quick_frontend: use of new logging system
author Goffi <goffi@goffi.org>
date Mon, 05 May 2014 18:58:34 +0200
parents 1fe00f0c9a91
children 75025461141f
comparison
equal deleted inserted replaced
1008:d70d4fe5c5f8 1009:d1084f7e56a5
15 # GNU Affero General Public License for more details. 15 # GNU Affero General Public License for more details.
16 16
17 # You should have received a copy of the GNU Affero General Public License 17 # You should have received a copy of the GNU Affero General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. 18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 19
20 from logging import debug, info, error 20 from sat.core.log import getLogger
21 log = getLogger(__name__)
21 from sat.tools.jid import JID 22 from sat.tools.jid import JID
22 23
23 24
24 25
25 class QuickCardGame(object): 26 class QuickCardGame(object):
151 if phase == "play": 152 if phase == "play":
152 self.state = "play" 153 self.state = "play"
153 elif phase == "ecart": 154 elif phase == "ecart":
154 self.state = "ecart" 155 self.state = "ecart"
155 else: 156 else:
156 error ('INTERNAL ERROR: unmanaged game phase') 157 log.error ('INTERNAL ERROR: unmanaged game phase')
157 158
158 for suit, value in played_cards: 159 for suit, value in played_cards:
159 self.hand.append(self.cards[suit, value]) 160 self.hand.append(self.cards[suit, value])
160 161
161 self.hand.sort() 162 self.hand.sort()