gnome-games r7645 - in branches/gnome-2-22/glchess: . src/lib
- From: rancell svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-games r7645 - in branches/gnome-2-22/glchess: . src/lib
- Date: Sun, 11 May 2008 09:15:02 +0100 (BST)
Author: rancell
Date: Sun May 11 08:15:02 2008
New Revision: 7645
URL: http://svn.gnome.org/viewvc/gnome-games?rev=7645&view=rev
Log:
Fix regression in loaded games not displaying result
Modified:
branches/gnome-2-22/glchess/ChangeLog
branches/gnome-2-22/glchess/src/lib/game.py
Modified: branches/gnome-2-22/glchess/src/lib/game.py
==============================================================================
--- branches/gnome-2-22/glchess/src/lib/game.py (original)
+++ branches/gnome-2-22/glchess/src/lib/game.py Sun May 11 08:15:02 2008
@@ -420,6 +420,11 @@
if not self.__blackPlayer.isAlive:
self.killPlayer(self.__blackPlayer)
return
+
+ # Stop if game ended on loaded moves
+ if self.result != RESULT_IN_PROGRESS:
+ self._notifyEndGame()
+ return
self.startLock()
@@ -678,9 +683,12 @@
self.result = result
self.rule = rule
if self.isStarted():
- self.__currentPlayer._setReadyToMove(False)
- for player in self.__players:
- player.onGameEnded(self)
+ self._notifyEndGame()
+
+ def _notifyEndGame(self):
+ self.__currentPlayer._setReadyToMove(False)
+ for player in self.__players:
+ player.onGameEnded(self)
def getMoves(self):
"""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]