mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Refactor some code.
This commit is contained in:
parent
33b5df8482
commit
59d5006c63
1 changed files with 1 additions and 4 deletions
|
@ -2956,11 +2956,8 @@ Congratulations, you did it !
|
||||||
if self.moves.index == 0:
|
if self.moves.index == 0:
|
||||||
return
|
return
|
||||||
self.moves.index -= 1
|
self.moves.index -= 1
|
||||||
m = self.moves.history[self.moves.index]
|
|
||||||
m = m[:]
|
|
||||||
m.reverse()
|
|
||||||
self.moves.state = self.S_UNDO
|
self.moves.state = self.S_UNDO
|
||||||
for atomic_move in m:
|
for atomic_move in reversed(self.moves.history[self.moves.index]):
|
||||||
atomic_move.undo(self)
|
atomic_move.undo(self)
|
||||||
self.moves.state = self.S_PLAY
|
self.moves.state = self.S_PLAY
|
||||||
self.stats.undo_moves += 1
|
self.stats.undo_moves += 1
|
||||||
|
|
Loading…
Add table
Reference in a new issue