summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
3c0a8e1)
Undo should be available after the first turn, but wasn't. The reason
is twofold:
* `update-undo-redo-sensitivity' was hooked onto :processing-move
rather than :start-turn, which was just a mistake, though it seemed
not to be because the order of the notifications was wrong; and
* `perform-explosions', which is where :start-turn is issued, was
being called before the undo record was laid down, whereas it should
always have been afterwards.
(unless (cell-played cell player-index)
(return-from escape))
(setf (player-state player) :playing)
(unless (cell-played cell player-index)
(return-from escape))
(setf (player-state player) :playing)
- (changed game :processing-move)
- (perform-explosions game (list cell)))))))
+ (changed game :processing-move))
+ (perform-explosions game (list cell))))))
(defmethod restart-game ((game atom-game) &key grid players)
(game-cancel-timeout game)
(defmethod restart-game ((game atom-game) &key grid players)
(game-cancel-timeout game)
(defmethod notify progn
((window atom-game-window) (game atom-game) aspect &key)
(case aspect
(defmethod notify progn
((window atom-game-window) (game atom-game) aspect &key)
(case aspect
- ((:undo :redo :refresh :processing-move)
+ ((:undo :redo :refresh :start-turn)
(update-undo-redo-sensitivity window))))
(defun action-undo (window)
(update-undo-redo-sensitivity window))))
(defun action-undo (window)