From ea0d0dcbf4b23f9ed84300b9771ca3b2deab1a18 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 13 Aug 2026 16:48:15 +0200 Subject: moving enum around --- src/board/fen.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/board/fen.cpp') diff --git a/src/board/fen.cpp b/src/board/fen.cpp index dd503e0..e020e78 100644 --- a/src/board/fen.cpp +++ b/src/board/fen.cpp @@ -48,7 +48,14 @@ static void clearBoard(Game *g) { g->whiteCastleKing = false; g->whiteCastleQueen = false; } - +enum parserState : std::uint8_t { + BOARD, + PLAYER_TO_MOVE, + CASTLE, + ENPASSANT, + HALF_MOVE_CLOCK, + FULL_MOVE_CLOCK, +}; void setBoardFen(const std::string &fen, Game *g) { clearBoard(g); // example fen rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1 @@ -56,14 +63,7 @@ void setBoardFen(const std::string &fen, Game *g) { int rank = 7; Position enpassant = {}; - enum parserState : std::uint8_t { - BOARD, - PLAYER_TO_MOVE, - CASTLE, - ENPASSANT, - HALF_MOVE_CLOCK, - FULL_MOVE_CLOCK, - }; + parserState parser_state = BOARD; for (uint i = 0; i < fen.length(); i++) { -- cgit v1.2.3