comparison frontends/src/wix/card_game.py @ 587:952322b1d490

Remove trailing whitespaces.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Fri, 18 Jan 2013 17:55:34 +0100
parents ca13633d3b6b
children 84a6e83157c2
comparison
equal deleted inserted replaced
586:6a718ede8be1 587:952322b1d490
47 print "Carte:",suit, value #, self.bout 47 print "Carte:",suit, value #, self.bout
48 48
49 def draw(self, dc, x, y): 49 def draw(self, dc, x, y):
50 """Draw the card on the device context 50 """Draw the card on the device context
51 @param dc: device context 51 @param dc: device context
52 @param x: abscissa 52 @param x: abscissa
53 @param y: ordinate""" 53 @param y: ordinate"""
54 dc.DrawBitmap(self.bitmap, x, y, True) 54 dc.DrawBitmap(self.bitmap, x, y, True)
55 55
56 56
57 class CardPanel(QuickCardGame,wx.Panel): 57 class CardPanel(QuickCardGame,wx.Panel):
150 self.orig_y = self.GetSizeTuple()[1] - CARD_HEIGHT - 20 150 self.orig_y = self.GetSizeTuple()[1] - CARD_HEIGHT - 20
151 self.end_y = self.orig_y + CARD_HEIGHT 151 self.end_y = self.orig_y + CARD_HEIGHT
152 152
153 def onPaint(self, event): 153 def onPaint(self, event):
154 dc = wx.PaintDC(self) 154 dc = wx.PaintDC(self)
155 155
156 #We print the names to know who play where TODO: print avatars when available 156 #We print the names to know who play where TODO: print avatars when available
157 max_x, max_y = self.GetSize() 157 max_x, max_y = self.GetSize()
158 border = 10 #border between nick and end of panel 158 border = 10 #border between nick and end of panel
159 right_y = left_y = 200 159 right_y = left_y = 200
160 right_width, right_height = dc.GetTextExtent(self.right_nick) 160 right_width, right_height = dc.GetTextExtent(self.right_nick)
212 self.Refresh() 212 self.Refresh()
213 213
214 def onMouseClick(self, event): 214 def onMouseClick(self, event):
215 print "mouse click:",event.GetPosition() 215 print "mouse click:",event.GetPosition()
216 pos_x,pos_y = event.GetPosition() 216 pos_x,pos_y = event.GetPosition()
217 217
218 if self.state == "chien": 218 if self.state == "chien":
219 self.to_show = [] 219 self.to_show = []
220 self.state = "wait" 220 self.state = "wait"
221 return 221 return
222 elif self.state == "wait_for_ecart": 222 elif self.state == "wait_for_ecart":