#include "tile.h" #include Tile::Tile() { } Tile::Tile(Tile::Type t, bool re, bool ro) : type(t), red(re), rotated(ro){ } int Tile::get_num() const { if(type >= Man_1 && type <= Sou_9) { return (type - Man_1) % 9 + 1; } else { return 0; } } bool Tile::operator==(const Tile& other) const { return type == other.type; } bool Tile::operator<(const Tile& other) const { return type == other.type ? red : type < other.type; } Tile Tile::operator++(int) { type = Type(type + 1); return *this; } void Tiles::sort() { std::sort(begin(), end()); }