1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:27:45 +00:00

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
parent 79a204a56a
commit 336eae219b

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