1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:37:45 +00:00

Chess: Add support for UCI engines

This commit is contained in:
Peter Elliott 2020-08-19 17:53:50 -06:00 committed by Andreas Kling
parent 7331b2b2f6
commit fb62eed058
8 changed files with 202 additions and 2 deletions

View file

@ -31,6 +31,7 @@
#include <AK/Optional.h>
#include <AK/StringView.h>
#include <AK/Traits.h>
#include <AK/Vector.h>
namespace Chess {
@ -136,7 +137,8 @@ public:
void generate_moves(Callback callback, Colour colour = Colour::None) const;
Result game_result() const;
Colour turn() const { return m_turn; };
Colour turn() const { return m_turn; }
const Vector<Move>& moves() const { return m_moves; }
bool operator==(const Board& other) const;
@ -155,6 +157,7 @@ private:
bool m_black_can_castle_queenside { true };
HashMap<Board, int> m_previous_states;
Vector<Move> m_moves;
friend struct AK::Traits<Board>;
};