From 94a1189d757f0269ac081ad2d750152e30564986 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Sun, 19 Dec 2010 12:19:41 +0100 Subject: Linked common as submodule. --- common | 1 + common/action.h | 55 ------------------------------------------------------- 2 files changed, 1 insertion(+), 55 deletions(-) create mode 160000 common delete mode 100644 common/action.h (limited to 'common/action.h') diff --git a/common b/common new file mode 160000 index 0000000..dd64a35 --- /dev/null +++ b/common @@ -0,0 +1 @@ +Subproject commit dd64a35c949738c2c321989d065e0754556823d5 diff --git a/common/action.h b/common/action.h deleted file mode 100644 index e229d2c..0000000 --- a/common/action.h +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef ACTION_H -#define ACTION_H - -#include "list.h" - -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 - }; - - //! Action target type. - enum TargetType { - //! Action is targetless. - None, - //! Target is index in first group (concealed hand). - Index, - //! Target is index of group. - Group - }; - - //! Type of action. - Type type; - - //! Target of action (if applicable). - TargetType target_type; - int target_offset; - - Action(); - Action(Type ty, TargetType tt = None, int to = 0); - - //! Compare to another action. - bool operator==(const Action& other); - - template - void serialize(Archive & ar, const unsigned int version) { - ar & type; - ar & target_type; - ar & target_offset; - } -}; - -//! List of actions. -typedef List Actions; - -#endif -- cgit v1.2.3