00001 00028 #ifndef DMN_HAND_H 00029 #define DMN_HAND_H 1 00030 00031 #include <dmn/dmn.h> 00032 #include <dmn/core.h> 00033 #include <dmn/dominoes.h> 00034 #include <dmn/module.h> 00035 00036 #include <list> 00037 00038 namespace dmn 00039 { 00043 class Hand: public Module 00044 { 00045 public: 00049 Hand(); 00050 00054 virtual ~Hand() {} 00055 00063 virtual bool configure(Core *core) = 0; 00064 00070 virtual ID player_who_started() = 0; 00071 00077 virtual void set_player_who_starts(ID player) = 0; 00078 00084 virtual ID turn() = 0; 00085 00091 virtual int number_dominoes() = 0; 00092 00098 virtual HalfDomino max_half_value() = 0; 00099 00107 virtual int dominoes_played(Dominoes *dominoes) = 0; 00108 00116 virtual int dominoes_has_player(ID player) = 0; 00117 00128 virtual bool shuffle_tile(ID *player, Domino *domino) = 0; 00129 00139 virtual bool domino_playable(ID player, Domino domino, HalfDomino half) 00140 = 0; 00141 00149 virtual void set_play_domino(ID player, Domino domino, HalfDomino half) 00150 = 0; 00151 00160 virtual bool set_player_pass(ID player, Domino *domino) = 0; 00161 00171 virtual ID winner(Points *points) = 0; 00172 00178 virtual bool is_finished() = 0; 00179 }; 00180 }; 00181 00182 #endif // DMN_HAND_H