stellarUCI Chess engine written in C++20 |
git clone git://git.dimitrijedobrota.com/stellar.git |
Log | Files | Refs | README | LICENSE |
color.hpp (384B)
0 #ifndef STELLAR_COLOR_H
1 #define STELLAR_COLOR_H
3 #include <string>
5 namespace color {
7 enum Color {
8 WHITE = 0,
9 BLACK
10 };
12 inline constexpr const Color other(const Color color) { return color == WHITE ? BLACK : WHITE; }
13 inline constexpr const std::string to_string(const Color color) {
14 return std::string(color == WHITE ? "white" : "black");
15 }
17 } // namespace color
19 #endif