Bladeren bron

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.
Tim Ledbetter 2 jaren geleden
bovenliggende
commit
336eae219b
1 gewijzigde bestanden met toevoegingen van 2 en 0 verwijderingen
  1. 2 0
      Userland/Games/Chess/Engine.cpp

+ 2 - 0
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()