Chess 0.0.1
A library written in c
Loading...
Searching...
No Matches
color.h
Go to the documentation of this file.
1
8#ifndef CHESS_COLOR_H_INCLUDED
9#define CHESS_COLOR_H_INCLUDED
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15#include <chess/macros.h>
16
17#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 202311L
18 #include <stdbool.h>
19#endif
20#include <stdint.h>
21
32
38
45
52
53#ifdef __cplusplus
54}
55#endif
56
57#endif // CHESS_COLOR_H_INCLUDED
void chess_color_debug(ChessColor color)
Prints a debug representation of the given color.
ChessColor
Represents the color of a chess piece, square or player.
Definition color.h:26
@ CHESS_COLOR_BLACK
Definition color.h:28
@ CHESS_COLOR_WHITE
Definition color.h:27
@ CHESS_COLOR_NONE
Definition color.h:30
ChessColor chess_color_opposite(ChessColor color)
Returns the opposite color (white <-> black).
bool chess_color_is_valid(ChessColor color)
Checks if the given color is valid (white or black).
Defines macros and constants for the library.
#define CHESS_ENUM(type, name)
Defines a typed enum or a typedef enum based on the availability of typed enums in the compiler.
Definition macros.h:84