main.cpp 555 B

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