aboutsummaryrefslogtreecommitdiff
path: root/src/uci.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/uci.cpp')
-rw-r--r--src/uci.cpp14
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();