finished setbyfen

This commit is contained in:
rektdie committed 2025-03-12 14:30:12 +01:00
1 parent 69a7855f96
commit ad6ee77a46
2 files changed
+22 -3

No files matched your search

+10 -1
View File
@@ -16,4 +16,13 @@ std::vector<std::string> split(std::string_view str, char delim) {
}
return results;
}
}
int parseSquare(std::string_view str) {
constexpr std::string_view files = "abcdefgh";
int file = files.find(str[0]);
int rank = str[1] - '0';
return file + rank * 8;
}