From 658a797ec8cb5b6d8607fac089e036685f2a3958 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 27 Jul 2026 10:26:54 +0200 Subject: adding enpassant --- src/board.hpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/board.hpp') diff --git a/src/board.hpp b/src/board.hpp index 05706ff..44d32ee 100644 --- a/src/board.hpp +++ b/src/board.hpp @@ -28,22 +28,24 @@ struct Piece { bool moved; }; +struct Position { + uint8_t rank; + uint8_t file; + + bool operator==(const Position &) const = default; +}; + struct Board { Piece pieces[64]; bool turn; // 1 white; 0 black std::string castle; uint8_t halfMoveClock; uint16_t MoveClock; + Position enPassant; + bool canEnpassant; GameState state; }; -struct Position { - uint8_t rank; - uint8_t file; - - bool operator==(const Position &) const = default; -}; - struct Move { Position From; Position To; -- cgit v1.2.3