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

standard.h

Go to the documentation of this file.
00001 
00025 #ifndef CORE_STANDARD_H
00026 #define CORE_STANDARD_H 1
00027 
00028 #include <dmn/dmn.h>
00029 
00030 #include <dmn/core.h>
00031 #include <dmn/config.h>
00032 #include <dmn/display.h>
00033 #include <dmn/game.h>
00034 #include <dmn/hand.h>
00035 #include <dmn/match.h>
00036 #include <dmn/player.h>
00037 #include <dmn/sound.h>
00038 #include <dmn/tournament.h>
00039 
00040 #include "db.h"
00041 
00042 namespace dmn
00043 {
00047   class CoreStandard: public DB
00048   {
00049   private:
00050     /* Paths */
00051     std::string display_;
00052     std::string sound_;
00053     std::string tournament_;
00054     std::string match_;
00055     std::string game_;
00056     std::string hand_;
00057     std::list<PlayerInfo> teams_;
00058 
00064     ID play_hand(ID hand_id, ID display_id);
00065 
00071     ID play_game(ID match_id, ID display_id);
00072 
00078     ID play_match(ID tournament_id, ID display_id);
00079 
00085     ID play_tournament(std::list<ID> teams);
00086 
00092     void insert_teams(const std::list<PlayerInfo>& teams);
00093 
00094   public:
00098     CoreStandard();
00099 
00100     //  bool play(const Config& display);
00101 
00102     bool play(const std::list<PlayerInfo>& teams,
00103         const std::string& tournament, const std::string& match,
00104         const std::string& game, const std::string& hand,
00105         const std::string& display, const std::string& sound);
00106 
00107     bool classification_of_tournament(ID tournament, std::list<ID>* teams);
00108     void score_board_match(ID match, std::list<Score>* score);
00109     bool is_first_hand_of_game(ID game, ID hand);
00110     void score_board_game(ID game, std::list<Score>* score);
00111     ID player_who_started_in_hand(ID hand);
00112     int number_dominoes_in_hand(ID hand);
00113     HalfDomino max_half_value_in_hand(ID hand);
00114     int dominoes_in_hand(ID hand, Dominoes* dominoes);
00115     int dominoes_has_player_in_hand(ID hand, ID player);
00116     bool domino_playable_in_hand(ID hand, Player* player, ID id,
00117          Domino domino, HalfDomino half);
00118     const std::string player_name(ID player);
00119     bool is_player_interactive(ID player);
00120   };
00121 };
00122 
00123 #endif // CORE_STANDARD_H

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