summaryrefslogtreecommitdiff
path: root/Games/Chess/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Games/Chess/main.cpp')
-rw-r--r--Games/Chess/main.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Games/Chess/main.cpp b/Games/Chess/main.cpp
index 150b25caaf..64545e944d 100644
--- a/Games/Chess/main.cpp
+++ b/Games/Chess/main.cpp
@@ -139,6 +139,10 @@ int main(int argc, char** argv)
app_menu.add_separator();
app_menu.add_action(GUI::Action::create("New game", { Mod_None, Key_F2 }, [&](auto&) {
+ if (widget.board().game_result() == Chess::Board::Result::NotFinished) {
+ if (widget.resign() < 0)
+ return;
+ }
widget.reset();
}));
app_menu.add_separator();
@@ -206,7 +210,7 @@ int main(int argc, char** argv)
widget.set_engine(nullptr);
} else {
widget.set_engine(Engine::construct(action.text()));
- widget.maybe_input_engine_move();
+ widget.input_engine_move();
}
});
engines_action_group.add_action(*action);