comparison frontends/wix/card_game.py @ 133:d998adb62d1a

wix: fixed wrong class Name in card_game
author Goffi <goffi@goffi.org>
date Fri, 16 Jul 2010 20:14:01 +0800
parents 6be927a465ed
children 8c80d4dec7a8
comparison
equal deleted inserted replaced
132:a86607e5cf38 133:d998adb62d1a
155 155
156 def chooseContrat(self, xml_data): 156 def chooseContrat(self, xml_data):
157 """Called when the player as to select hist contrat 157 """Called when the player as to select hist contrat
158 @param xml_data: SàT xml representation of the form""" 158 @param xml_data: SàT xml representation of the form"""
159 misc = {'callback': self.contratSelected} 159 misc = {'callback': self.contratSelected}
160 form = Form(self.parent.host, xml_data, title = _('Please choose your contrat'), options = ['NO_CANCEL'], misc = misc) 160 form = XMLUI(self.parent.host, xml_data, title = _('Please choose your contrat'), options = ['NO_CANCEL'], misc = misc)
161 161
162 def showCards(self, game_stage, cards, data): 162 def showCards(self, game_stage, cards, data):
163 """Display cards in the middle of the game (to show for e.g. chien ou poignée)""" 163 """Display cards in the middle of the game (to show for e.g. chien ou poignée)"""
164 self.to_show = [] 164 self.to_show = []
165 for suit, value in cards: 165 for suit, value in cards:
176 self.state = "play" 176 self.state = "play"
177 177
178 def showScores(self, xml_data, winners, loosers): 178 def showScores(self, xml_data, winners, loosers):
179 """Called when the player as to select hist contrat 179 """Called when the player as to select hist contrat
180 @param xml_data: SàT xml representation of the form""" 180 @param xml_data: SàT xml representation of the form"""
181 form = Form(self.parent.host, xml_data, title = _('You win \o/') if self.player_nick in winners else _('You loose :('), options = ['NO_CANCEL']) 181 form = XMLUI(self.parent.host, xml_data, title = _('You win \o/') if self.player_nick in winners else _('You loose :('), options = ['NO_CANCEL'])
182 182
183 def cardsPlayed(self, player, cards): 183 def cardsPlayed(self, player, cards):
184 """A card has been played by player""" 184 """A card has been played by player"""
185 if self.to_show: 185 if self.to_show:
186 self.to_show = [] 186 self.to_show = []