summaryrefslogtreecommitdiff
path: root/src/bitboard.h
blob: b92d67f3906da299a21e34b6520ffb6e410b9052 (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
32
33
34
35
36
37
38
#ifndef BITBOARD_H
#define BITBOARD_H

#include "ints.h"

typedef u64 bitboard_t;

enum {
  WHITE_KING,
  WHITE_QUEEN,
  WHITE_ROOK,
  WHITE_BISHOP,
  WHITE_KNIGHT,
  WHITE_PAWN,
  BLACK_KING,
  BLACK_QUEEN,
  BLACK_ROOK,
  BLACK_BISHOP,
  BLACK_KNIGHT,
  BLACK_PAWN,
  PIECE_TYPE_COUNT,
};

enum {
  WHITE_SHORT_CASTLE,
  WHITE_LONG_CASTLE,
  BLACK_SHORT_CASTLE,
  BLACK_LONG_CASTLE,
};

typedef struct {
  bitboard_t bitboards[PIECE_TYPE_COUNT];
  u8 castling;
} position;

position starting_position();

#endif // !BITBOARD_H