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.
This commit is contained in:
Tim Ledbetter 2023-04-30 17:35:40 +01:00 committed by Sam Atkins
commit 336eae219b
Notes: sideshowbarker 2024-07-17 22:09:47 +09:00

View file

@ -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()