44 #ifndef DUMBO_TIC_TAC_TOE_SQUARE_H
45 #define DUMBO_TIC_TAC_TOE_SQUARE_H
47 #include <dumbo/core/move.h>
50 #include <boost/functional/hash.hpp>
59 bool my_square =
true;
63 Square(uint8_t ii, uint8_t jj,
bool mine)
64 : row(ii), col(jj), my_square(mine) {}
67 void Print(std::ostream& output)
const {
69 output <<
"Computer: ";
73 output <<
"(" <<
static_cast<unsigned int>(row) <<
", "
74 << static_cast<unsigned int>(col) <<
")";
77 void Load(std::istream& input) {
82 row =
static_cast<uint8_t
>(r);
83 col =
static_cast<uint8_t
>(c);
87 bool operator==(
const Square& rhs)
const {
88 return row == rhs.row && col == rhs.col && my_square == rhs.my_square;
93 size_t operator()(
const Square& sq)
const {
95 boost::hash_combine(seed, sq.row);
96 boost::hash_combine(seed, sq.col);
97 boost::hash_combine(seed, sq.my_square);