1 #ifndef BOARD_POSITION_HPP
2 #define BOARD_POSITION_HPP
3 #include <functional>
4 #include <string>
5 
6 struct Position {
7     int row;     // Bottom to Top[1,8]
8     int column;  // Left to Right[1,8]
9 };
10 
11 std::string to_text(const Position& pos);
12 
13 bool operator==(const Position& p1, const Position& p2);
14 
15 /// Custom specialization of std::hash for Position.
16 namespace std {
17 template <>
18 struct hash<Position> {
19     using argument_type = Position;
20     using result_type = std::size_t;
21     result_type operator()(const argument_type& position) const noexcept;
22 };
23 }  // namespace std
24 #endif  // BOARD_POSITION_HPP
25