35 lines
669 B
C
35 lines
669 B
C
|
//
|
||
|
// Created by hamac on 20.12.2024.
|
||
|
//
|
||
|
|
||
|
#ifndef CHESSUTILS_H
|
||
|
#define CHESSUTILS_H
|
||
|
|
||
|
//
|
||
|
// Created by hamac on 18.12.2024.
|
||
|
//
|
||
|
|
||
|
#include <string>
|
||
|
#include <sstream>
|
||
|
#include <vector>
|
||
|
#include <unordered_map>
|
||
|
|
||
|
class ChessUtils {
|
||
|
public:
|
||
|
inline static const std::unordered_map<int, int> fileConvertion = {
|
||
|
{0, 7},
|
||
|
{1, 6},
|
||
|
{2, 5},
|
||
|
{3, 4},
|
||
|
{4, 3},
|
||
|
{5, 2},
|
||
|
{6, 1},
|
||
|
{7, 0}
|
||
|
};
|
||
|
static std::vector<std::string> split(const std::string &s, char delim);
|
||
|
|
||
|
static std::pair<int, int> convertPosition(const std::string &pos);
|
||
|
};
|
||
|
|
||
|
#endif //CHESSUTILS_H
|