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

text.h

Go to the documentation of this file.
00001 
00027 #ifndef DISPLAY_TEXT_H
00028 #define DISPLAY_TEXT_H 1
00029 
00030 #include <dmn/display.h>
00031 #include <dmn/core.h>
00032 
00033 #include <list>
00034 
00035 namespace dmn
00036 {
00042   class DisplayText: public Display
00043   {
00044   private:
00045     struct player_t {
00046       ID couple_id;
00047       ID player_id;
00048       Domino last_domino_played;
00049       bool domino_played;   /* true if the player played a domino in the
00050              hand or false if not */
00051     };
00052 
00053     Core *core_;      /* Core */
00054     /* game_id, match_id, etc is needed because a hand_id can be removed from a
00055        game_id during the game */
00056     ID hand_id_, game_id_, match_id_, tournament_id_;
00057     std::list<player_t> players_; /* List of player_t */
00058     int dominoes_shuffled_;
00059     bool is_configured_;    /* 1 -> Module configured, 0 -> Module not
00060              configured */
00061 
00070     int insert_player(ID couple_id, ID player_id);
00071 
00075     void delete_players();
00076 
00082     void display_dominoes();
00083 
00087     void display_players();
00088 
00095     void show_count_dominoes(Dominoes dominoes, ID hand_id);
00096   public:
00100     DisplayText();
00101 
00102     bool configure(Core *core);
00103     void tournament_winner(ID team_id);
00104     void match_winner(ID couple_id);
00105     void game_winner(ID couple_id);
00106     void hand_winner(ID player_id, Points points);
00107     void tournament_classification();
00108     void match_score_board();
00109     void game_score_board();
00110     void shuffling_tile(ID player_id, Domino domino);
00111     void domino_played(ID player_id, Domino domino, HalfDomino half);
00112     void player_pass(ID player_id);
00113   };
00114 };
00115 
00116 #endif // DISPLAY_TEXT_H

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