aboutsummaryrefslogtreecommitdiff
path: root/src/board.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/board.hpp')
-rw-r--r--src/board.hpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/board.hpp b/src/board.hpp
index 5e4e777..1c53827 100644
--- a/src/board.hpp
+++ b/src/board.hpp
@@ -23,27 +23,27 @@ enum GameState {
std::string toChar(PieceType type, bool white);
struct Piece {
- bool color;
- PieceType type;
- bool moved;
+ bool color = 0;
+ PieceType type = NONE;
+ bool moved = false;
};
struct Position {
- uint8_t rank;
- uint8_t file;
+ uint8_t rank = 0;
+ uint8_t file = 0;
bool operator==(const Position &) const = default;
};
struct Game {
Piece pieces[64];
- bool turn; // 1 white; 0 black
- std::string castle;
- uint8_t halfMoveClock;
- uint16_t MoveClock;
+ bool turn = 1; // 1 white; 0 black
+ std::string castle = "";
+ uint8_t halfMoveClock = 0;
+ uint16_t MoveClock = 0;
Position enPassant;
- bool canEnpassant;
- GameState state;
+ bool canEnpassant = 0;
+ GameState state = TURN;
};
struct Move {