summaryrefslogtreecommitdiff
path: root/Userland/Games
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@gmail.com>2021-06-12 19:33:11 +0100
committerLinus Groh <mail@linusgroh.de>2021-06-13 19:29:52 +0100
commit8ee447b71809604c45dcdd051f68e80b904d4ba9 (patch)
tree8034d2b04b0b726033d887b03fdc3970723a3404 /Userland/Games
parentcf504ccc6abf74fc07a9dace39314c477c4d1df9 (diff)
downloadserenity-8ee447b71809604c45dcdd051f68e80b904d4ba9.zip
Solitaire: Prevent undo when the game is over
Diffstat (limited to 'Userland/Games')
-rw-r--r--Userland/Games/Solitaire/Game.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Userland/Games/Solitaire/Game.cpp b/Userland/Games/Solitaire/Game.cpp
index 45e23c0642..809bfa70bc 100644
--- a/Userland/Games/Solitaire/Game.cpp
+++ b/Userland/Games/Solitaire/Game.cpp
@@ -78,6 +78,10 @@ void Game::start_game_over_animation()
if (m_game_over_animation)
return;
+ m_last_move = {};
+ if (on_undo_availability_change)
+ on_undo_availability_change(false);
+
create_new_animation_card();
// We wait one frame, to make sure that the foundation stacks are repainted before we start.