2025-02-02 17:13:55 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "../move.hpp"
|
|
|
|
|
2025-02-02 16:49:10 +01:00
|
|
|
#include <cstdint>
|
2025-02-02 17:13:55 +01:00
|
|
|
#include <vector>
|
2025-02-02 16:49:10 +01:00
|
|
|
|
|
|
|
enum Piece : int8_t {
|
2025-02-02 15:15:14 +01:00
|
|
|
None = 0,
|
|
|
|
King = 1,
|
|
|
|
Pawn = 2,
|
|
|
|
Knigt = 3,
|
|
|
|
Bishop = 4,
|
|
|
|
Rook = 5,
|
|
|
|
Queen = 6,
|
|
|
|
};
|
|
|
|
|
2025-02-02 16:49:10 +01:00
|
|
|
enum Colour : int8_t {
|
2025-02-02 15:15:14 +01:00
|
|
|
White = 8,
|
|
|
|
Black = 16,
|
|
|
|
};
|
2025-02-02 17:13:55 +01:00
|
|
|
|
|
|
|
class Board;
|
2025-02-02 18:17:37 +01:00
|
|
|
struct Coords;
|
2025-02-02 17:16:37 +01:00
|
|
|
|
2025-02-02 18:17:37 +01:00
|
|
|
std::vector<Move> legal_moves(const Piece, const Board&, const Coords);
|
2025-02-02 17:16:37 +01:00
|
|
|
|
2025-02-02 18:17:37 +01:00
|
|
|
std::vector<Move> pawn_moves(const Board&, const Coords);
|
|
|
|
std::vector<Move> rook_moves(const Board&, const Coords);
|
|
|
|
std::vector<Move> knight_moves(const Board&, const Coords);
|
|
|
|
std::vector<Move> bishop_moves(const Board&, const Coords);
|
|
|
|
std::vector<Move> queen_moves(const Board&, const Coords);
|
|
|
|
std::vector<Move> king_moves(const Board&, const Coords);
|