aboutsummaryrefslogtreecommitdiff
path: root/src/board.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/board.cpp')
-rw-r--r--src/board.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/board.cpp b/src/board.cpp
index dd2d32b..5c30d75 100644
--- a/src/board.cpp
+++ b/src/board.cpp
@@ -58,7 +58,7 @@ void printBoard(board *b) {
std::cout << line;
std::cout << letter;
-
+
std::println();
std::println("Turn: {}", b->turn == WHITE ? "White" : "Black");
std::println("Castling: {}", b->castle);
@@ -97,6 +97,16 @@ void setBoardFen(std::string fen, board *b) {
state = ENPASSANT;
continue;
}
+ if (state == ENPASSANT) {
+ state = CLOCK1;
+ continue;
+ }
+ if (state == CLOCK1) {
+ state = CLOCK2;
+ continue;
+ }
+ }
+ if (state == ENPASSANT) {
continue;
}
if (state == CASTLE) {