00001 /****************************************************************************** 00002 * Wormux is a convivial mass murder game. 00003 * Copyright (C) 2001-2004 Lawrence Azzoug. 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 00018 ****************************************************************************** 00019 * Manage the end of game results of a team 00020 *****************************************************************************/ 00021 00022 #ifndef RESULTS_H 00023 #define RESULTS_H 00024 00025 #include <vector> 00026 #include <map> 00027 #include <string> 00028 00029 class Character; 00030 class Team; 00031 00032 // Could be a 5-tuple 00033 class TeamResults 00034 { 00035 private: 00036 //std::couple<const sting&, int> ? 00037 const std::string teamName; 00038 const Surface* team_logo; 00039 const Character* mostViolent; 00040 const Character* mostUsefull; 00041 const Character* mostUseless; 00042 const Character* biggestTraitor; 00043 protected: 00044 TeamResults(const std::string& name, 00045 const Surface* team_logo, 00046 const Character* MV, 00047 const Character* MUl, 00048 const Character* MUs, 00049 const Character* BT); 00050 public: 00051 static TeamResults* createTeamResults(Team* team); 00052 static TeamResults* createGlobalResults(std::vector<TeamResults*>* list); 00053 static std::vector<TeamResults*>* createAllResults(void); 00054 static void deleteAllResults(std::vector<TeamResults*>* results_list); 00055 00056 const std::string& getTeamName() const { return teamName; }; 00057 const Surface* getTeamLogo() const {return team_logo;}; 00058 const Character* getMostViolent() const { return mostViolent; }; 00059 const Character* getMostUsefull() const { return mostUsefull; }; 00060 const Character* getMostUseless() const { return mostUseless; }; 00061 const Character* getBiggestTraitor() const { return biggestTraitor; }; 00062 }; 00063 00064 typedef std::vector<TeamResults*>::iterator res_iterator; 00065 typedef std::vector<TeamResults*>::const_iterator const_res_iterator; 00066 #endif //RESULTS_H