diff options
| -rw-r--r-- | README.md | 11 | ||||
| -rw-r--r-- | src/board/board.cpp | 7 |
2 files changed, 10 insertions, 8 deletions
@@ -1,16 +1,17 @@ -Mono +# Mono + A UCI chess engine written in c++ -# Running +## Running -## Requirement +### Requirement - Cmake (3.24+) - C/C++ compiler that supports c 23 and c++ 23 standard (GCC 14+, Clang 18+) - ASan (sudo dnf install libasan) - UBSan (sudo dnf install libubsan) -## Building +### Building ```bash cmake -B build -S . # Run only on cmake config changes (and first time) @@ -23,7 +24,7 @@ cmake --build ./build # Build ./build/chess # Run the app ``` -## Details +### Details - [AddressSanitizer](https://github.com/google/sanitizers/wiki/AddressSanitizer) (aka ASan) - [UndefinedBehaviorSanitizer](https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html) (aka UBSan) diff --git a/src/board/board.cpp b/src/board/board.cpp index 2257010..b4c058a 100644 --- a/src/board/board.cpp +++ b/src/board/board.cpp @@ -1,10 +1,11 @@ -#include "board.hpp" -#include "moves.hpp" -#include "zobrist.hpp" #include <cassert> #include <cstdint> #include <cstdlib> +#include "board.hpp" +#include "moves.hpp" +#include "zobrist.hpp" + int PositionToIndex(Position i) { return i.rank * 8 + i.file; } Position FindKing(Game *b, bool color) { |
