aboutsummaryrefslogtreecommitdiff
path: root/src/board.hpp
blob: 12abda095487a73081982b0a6fe155c46e662d29 (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
#ifndef SRC_BOARD_H_
#define SRC_BOARD_H_

#include <cstdint>
#include <string>
enum pieceType {
  NONE,
  PAWN, 
  KNIGHT,
  BISHOP,
  ROOK,
  QUEEN,
  KING,
};

const char toChar(pieceType type)
 

struct Piece {
  bool color;
  pieceType type;
  bool moved;
};

struct board {
  Piece pieces[64];
  bool turn; // 1 white; 0 black
  std::string castle;
  uint8_t halfMoveClock;
  uint16_t MoveClock;
};

void printBoard(board *b);
void setBoardFen(std::string fen, board *b);
Piece createPiece(pieceType type, bool color, bool moved = false);
#endif /* SRC_BOARD_H_ */