summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorTim Ledbetter <timledbetter@gmail.com>2023-04-30 17:35:40 +0100
committerSam Atkins <atkinssj@gmail.com>2023-05-03 08:31:34 +0100
commit336eae219b06792424b05418dc95620239dd63ab (patch)
treee054daad447b04332767f05f43aafe82690cf461 /Userland
parent79a204a56af2707ee1ea1074966473294aad8992 (diff)
downloadserenity-336eae219b06792424b05418dc95620239dd63ab.zip
Chess: Spawn new engine process immediately after engine is selected
A new engine process is now started immediately, rather than waiting until a move needs to be made. This means that if the engine is playing as black, it can start up while the human player is making a move. This is noticable with stockfish, which can be slow to start up.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Games/Chess/Engine.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Games/Chess/Engine.cpp b/Userland/Games/Chess/Engine.cpp
index 8f8b95227b..83825e7d6c 100644
--- a/Userland/Games/Chess/Engine.cpp
+++ b/Userland/Games/Chess/Engine.cpp
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2020, the SerenityOS developers.
+ * Copyright (c) 2023, Tim Ledbetter <timledbetter@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@@ -19,6 +20,7 @@ Engine::~Engine()
Engine::Engine(StringView command)
: m_command(command)
{
+ connect_to_engine_service();
}
void Engine::connect_to_engine_service()