2020-08-20 20:04:08 -03:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2020, the SerenityOS developers.
|
|
|
|
|
*
|
2021-04-22 05:24:48 -03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-08-20 20:04:08 -03:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "ChessEngine.h"
|
|
|
|
|
#include <LibCore/EventLoop.h>
|
|
|
|
|
#include <LibCore/File.h>
|
2021-11-29 15:35:51 -03:00
|
|
|
#include <LibCore/System.h>
|
|
|
|
|
#include <LibMain/Main.h>
|
2020-08-20 20:04:08 -03:00
|
|
|
|
2021-11-29 15:35:51 -03:00
|
|
|
ErrorOr<int> serenity_main(Main::Arguments)
|
2020-08-20 20:04:08 -03:00
|
|
|
{
|
2021-11-29 15:35:51 -03:00
|
|
|
TRY(Core::System::pledge("stdio recvfd sendfd unix"));
|
2021-12-12 15:41:11 -03:00
|
|
|
Core::EventLoop loop;
|
2021-11-29 15:35:51 -03:00
|
|
|
TRY(Core::System::unveil(nullptr, nullptr));
|
2020-11-01 17:45:14 -03:00
|
|
|
|
2021-11-29 15:35:51 -03:00
|
|
|
auto engine = TRY(ChessEngine::try_create(Core::File::standard_input(), Core::File::standard_output()));
|
2020-08-20 20:04:08 -03:00
|
|
|
return loop.exec();
|
|
|
|
|
}
|