// // Created by hamac on 18.12.2024. // #include #include #include #include #include "ChessUtils.h" std::vector ChessUtils::split(const std::string &s, char delim) { std::vector elems; std::stringstream ss(s); std::string item; while (std::getline(ss, item, delim)) { elems.push_back(item); } return elems; } //a4 std::pair ChessUtils::convertPosition(const std::string &pos) { int y = pos[pos.size()-2] - 'a'; int x = ChessUtils::fileConvertion.find((pos[pos.size()-1] - '0')-1)->second; return std::make_pair(x, y); }