mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:37:44 +00:00
ChessEngine: Handle the UCI quit command
This commit is contained in:
parent
13dbc69c23
commit
c2b9376409
3 changed files with 13 additions and 0 deletions
|
@ -17,5 +17,9 @@ ErrorOr<int> serenity_main(Main::Arguments)
|
|||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
auto engine = TRY(ChessEngine::try_create(Core::DeprecatedFile::standard_input(), Core::DeprecatedFile::standard_output()));
|
||||
engine->on_quit = [&](auto status_code) {
|
||||
loop.quit(status_code);
|
||||
};
|
||||
|
||||
return loop.exec();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue