Serenity Operating System
at master 21 lines 585 B view raw
1/* 2 * Copyright (c) 2020, the SerenityOS developers. 3 * 4 * SPDX-License-Identifier: BSD-2-Clause 5 */ 6 7#include "ChessEngine.h" 8#include <LibCore/DeprecatedFile.h> 9#include <LibCore/EventLoop.h> 10#include <LibCore/System.h> 11#include <LibMain/Main.h> 12 13ErrorOr<int> serenity_main(Main::Arguments) 14{ 15 TRY(Core::System::pledge("stdio recvfd sendfd unix")); 16 Core::EventLoop loop; 17 TRY(Core::System::unveil(nullptr, nullptr)); 18 19 auto engine = TRY(ChessEngine::try_create(Core::DeprecatedFile::standard_input(), Core::DeprecatedFile::standard_output())); 20 return loop.exec(); 21}