#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; //! Targets of action (if applicable). std::vector target; //! Player doing this action int player; template void serialize(Archive & ar, const unsigned int version) { ar & type; ar & target; ar & player; } }; //! 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