20 std::cout <<
"\033[30m";
23 std::cout <<
"\033[31m";
26 std::cout <<
"\033[32m";
29 std::cout <<
"\033[33m";
32 std::cout <<
"\033[34m";
35 std::cout <<
"\033[35m";
38 std::cout <<
"\033[36m";
41 std::cout <<
"\033[37m";
52 std::cout <<
"\033[40m";
55 std::cout <<
"\033[41m";
58 std::cout <<
"\033[42m";
61 std::cout <<
"\033[43m";
64 std::cout <<
"\033[44m";
67 std::cout <<
"\033[45m";
70 std::cout <<
"\033[46m";
73 std::cout <<
"\033[47m";
80 std::cout <<
"\033[0m";
87 std::regex mouvmtpattern(
"[a-h][1-8][a-h][1-8]");
88 std::regex kingcastlemouvmtpattern(
"(O|o|0)-(O|o|0)");
89 std::regex queencastlemouvmtpattern(
"(O|o|0)-(O|o|0)-(O|o|0)");
90 return regex_match(cmd,mouvmtpattern) || regex_match(cmd,kingcastlemouvmtpattern) || regex_match(cmd,queencastlemouvmtpattern);
97 std::regex mouvmtpattern(
"[a-h][1-8][a-h][1-8]");
98 return regex_match(cmd,mouvmtpattern);
105 std::regex kingcastlemouvmtpattern(
"(O|o|0)-(O|o|0)");
106 return regex_match(cmd,kingcastlemouvmtpattern);
113 std::regex queencastlemouvmtpattern(
"(O|o|0)-(O|o|0)-(O|o|0)");
114 return regex_match(cmd,queencastlemouvmtpattern);
120 std::cout <<
"test" << i << std::endl;
a class representing coordinates
int get_x()
a function to get the x-axis attribute
int get_y()
a function to get the y-axis attribute
terminal_color
a type for terminal colors, used in the print functions.
void print_debug(int i)
Print a message to the standard output : "test i". Used for debug purposes.
bool king_castle_input(std::string const &cmd)
Check if an input correponds to a king castling move.
void terminal_reset_all()
reset all terminal attributes
bool standard_input(std::string const &cmd)
Check if an input corresponds to a standard move.
bool correct_input(std::string const &cmd)
Check if an input is conform.
void terminal_set_background_color(terminal_color color)
set the terminal background color to the input
bool queen_castle_input(std::string const &cmd)
Check if an input corresponds to a queen castling move.
void terminal_set_text_color(terminal_color color)
set the terminal font color to the input
bool is_corresponding(coordinates start, coordinates end, coordinates movement)
verify if a movement is corresponding to a starting and ending coordinates