dabodemo Commit
Revision 470
Date: 2006-12-11 11:15:43 -0800 (Mon, 11 Dec 2006)
Author: Paul
Changed:
U trunk/games/minesweeper.py
Log:
Minesweeper was checking for a win for every square cleared, in addition
to the click on the square. I believe this was causing the 'multiple
event' symptom in my posting regarding wxPython 2.7. I just won two
games with wx 2.6 and 2.7 with this fix and no longer observe the
problem of the high score getting recorded more than once.
Diff:
Modified: trunk/games/minesweeper.py
===================================================================
--- trunk/games/minesweeper.py 2006-12-11 13:41:12 UTC (rev 469)
+++ trunk/games/minesweeper.py 2006-12-11 19:15:43 UTC (rev 470)
@@ -171,9 +171,10 @@
+ Caption set to one of "", <mineMarkChar ("@")>, "?"
+ Raises StateChanged event
"""
- self._state = val
- self.update()
- self.raiseEvent(StateChanged)
+ if val != self.State:
+ self._state = val
+ self.update()
+ self.raiseEvent(StateChanged)
def _getCaption(self):
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev