1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:57:44 +00:00

ChessEngine: Add ChessEngine

This engine is pretty bad, but doesn't let itself get checkmated
This commit is contained in:
Peter Elliott 2020-08-20 17:04:08 -06:00 committed by Andreas Kling
parent fb62eed058
commit 1e57e32a93
10 changed files with 501 additions and 3 deletions

View file

@ -135,7 +135,12 @@ public:
template<typename Callback>
void generate_moves(Callback callback, Colour colour = Colour::None) const;
Move random_move(Colour colour = Colour::None) const;
Result game_result() const;
Colour game_winner() const;
int game_score() const;
bool game_finished() const;
int material_imbalance() const;
Colour turn() const { return m_turn; }
const Vector<Move>& moves() const { return m_moves; }