Chess 0.0.1
A library written in c
Loading...
Searching...
No Matches
moves.h
1#ifndef CHESS_MOVES_H_INCLUDED
2#define CHESS_MOVES_H_INCLUDED
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8#include <chess/macros.h>
9#include <chess/move.h>
10
11#include <stddef.h>
12
13CHESS_DEFINE_INTEGRAL_CONSTANT(size_t, CHESS_MOVES_MAXIMUM_COUNT, 256);
14
15typedef struct ChessMoves {
16 struct ChessMove moves[CHESS_MOVES_MAXIMUM_COUNT];
17 size_t count;
19
20ChessMoves chess_moves_generate_from(const ChessPosition *position, ChessSquare from);
21ChessMoves chess_moves_generate(const ChessPosition *position);
22
23#ifdef __cplusplus
24}
25#endif
26
27#endif // CHESS_MOVES_H_INCLUDED
Defines macros and constants for the library.
#define CHESS_DEFINE_INTEGRAL_CONSTANT(type, name, value)
Defines a compile time integral constant.
Definition macros.h:64
Defines the chess move type and related utility functions for representing and manipulating chess mov...
ChessSquare
Represents the squares on a chess board, from A1 to H8.
Definition square.h:35
Represents a move in a chess game.
Definition move.h:30
ChessSquare from
Definition move.h:31
Definition moves.h:15
Represents the position in a chess game.
Definition position.h:30