summaryrefslogtreecommitdiff
path: root/include/types.h
blob: 7489358367656602ac61b9f387d78535b2e82cdb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef _TYPES
#define _TYPES

#define SIZE 8

typedef enum {WHITE, BLACK} Color;
typedef enum {PAWN, ROCK, KNIGHT, BISHOP, QUEEN, KING} PieceType;

typedef struct {
    char row;
    char col;
} Coord;

typedef struct {
    Coord orig;
    Coord dest;
} Move;

typedef struct {
    Color color;
    PieceType type;
} Piece;

typedef struct {
    Color color;
    Piece* piece;
} Square;

typedef Square** Board;

#endif
nihil fit ex nihilo