diff options
| author | Adam <adammegarules1@gmail.com> | 2026-07-31 20:11:01 +0200 |
|---|---|---|
| committer | Adam <adammegarules1@gmail.com> | 2026-07-31 20:11:01 +0200 |
| commit | ee7815bad917cf880c147186a01679fb7ce46a8e (patch) | |
| tree | b645ea43ae002c1cc6cca37106b665390358f1b5 /src/uci.cpp | |
| parent | 061f2af803f7abfb4f655ef67769e79db705a3e1 (diff) | |
making stricter cmake list and then fixing bug it found
Diffstat (limited to 'src/uci.cpp')
| -rw-r--r-- | src/uci.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/uci.cpp b/src/uci.cpp index 33289b0..d9972b2 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -41,11 +41,11 @@ Move UciToMove(string uci) { Position from; Position to; - from.file = uci[0] - 'a'; - from.rank = '8' - uci[1]; + from.file = static_cast<uint8_t>(uci[0] - 'a'); + from.rank = static_cast<uint8_t>('8' - uci[1]); - to.file = uci[2] - 'a'; - to.rank = '8' - uci[3]; + to.file = static_cast<uint8_t>(uci[2] - 'a'); + to.rank = static_cast<uint8_t>('8' - uci[3]); return {from, to}; } @@ -133,8 +133,8 @@ void Uci() { Move best = GetBestMove(&game, depth); cout << "bestmove "; - cout << (char)(best.From.file + 'a') << 8 - best.From.rank - << (char)(best.To.file + 'a') << 8 - best.To.rank; + cout << static_cast<char>(best.From.file + 'a') << 8 - best.From.rank + << static_cast<char>(best.To.file + 'a') << 8 - best.To.rank; if (best.promotion != NONEPIECE) { switch (best.promotion) { @@ -206,7 +206,7 @@ void Uci() { cout.flush(); continue; } - int count = MoveGenTest(depth, &game); + uint64_t count = MoveGenTest(depth, &game); cout << count << "\n"; cout.flush(); |
