From e9c8925045ff30c9af08a74000a634559878e96e Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 25 Jul 2026 19:04:20 +0200 Subject: finishing parser state --- src/board.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/board.cpp') 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) { -- cgit v1.2.3