#ifndef ACTION_H #define ACTION_H #include #include class Action { public: //! Action types. enum Type { Pass, // discard Discard, // draw Riichi, // draw Chi, // discard Pon, // discard Kan, // draw, discard Ron, // discard Tsumo, // draw Draw // draw }; //! Type of action. Type type; //! Target of action (if applicable). int target; //! Compare to another action. bool operator==(const Action& other); template void serialize(Archive & ar, const unsigned int version) { ar & type; ar & target; } }; //! List of actions. class Actions : public std::vector { public: //! Check if specified action is present in list. bool contains(Action action); template void serialize(Archive & ar, const unsigned int version) { ar & boost::serialization::base_object >(*this); } }; #endif