Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

toX.h

Go to the documentation of this file.
00001 
00025 #ifndef GAME_TOX_H
00026 #define GAME_TOX_H 1
00027 
00028 
00029 #include <dmn/game.h>
00030 
00031 #include <list>
00032 
00033 namespace dmn
00034 {
00038   class GameToX: public Game
00039   {
00040   private:
00041     Core *core_;                  // Core
00042     ID hand_;     // hand played now
00043     std::list<Score> couples_;  // List of score_t
00044     ID player_starts_hand_;
00045     bool first_hand_;   // Is this the first hand of the game?
00046     Points max_points_;   // Points to win
00047 
00056     ID player_in_position(ID couple, unsigned long position);
00057 
00066     bool players_in_order(std::list<ID> couples, std::list<ID> *players);
00067 
00074     ID is_game_finished();
00075 
00084     ID next_player(ID player);
00085 
00086   public:
00092     GameToX(Points max_points);
00093 
00094     bool configure(Core *core);
00095     bool next_hand(ID hand, std::list<ID> *players);
00096     bool is_first_hand(ID hand);
00097     void set_hand_winner(ID hand, ID couple, Points points);
00098     Points points_to_win();
00099     void score_board(std::list<Score> *score);
00100     ID next_turn();
00101     ID winner();
00102     bool is_finished();
00103   };
00104 };
00105 
00106 #endif // GAME_TOX_H

Generated on Fri Dec 26 22:52:55 2003 for dmn by doxygen 1.3.4