2020-08-21 02:04:08 +03:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2020, the SerenityOS developers.
|
|
|
|
*
|
2021-04-22 11:24:48 +03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-08-21 02:04:08 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <LibChess/Chess.h>
|
|
|
|
#include <LibChess/UCIEndpoint.h>
|
|
|
|
|
|
|
|
class ChessEngine : public Chess::UCI::Endpoint {
|
|
|
|
C_OBJECT(ChessEngine)
|
|
|
|
public:
|
|
|
|
virtual ~ChessEngine() override { }
|
|
|
|
|
2021-11-01 01:38:04 +03:00
|
|
|
virtual void handle_uci() override;
|
|
|
|
virtual void handle_position(const Chess::UCI::PositionCommand&) override;
|
|
|
|
virtual void handle_go(const Chess::UCI::GoCommand&) override;
|
|
|
|
|
|
|
|
private:
|
2020-08-21 02:04:08 +03:00
|
|
|
ChessEngine() { }
|
|
|
|
ChessEngine(NonnullRefPtr<Core::IODevice> in, NonnullRefPtr<Core::IODevice> out)
|
|
|
|
: Endpoint(in, out)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
Chess::Board m_board;
|
|
|
|
};
|