00001 /* 00002 ** TowBowlTactics, a turn-based strategy football game. 00003 ** 00004 ** Copyright (C) 2006-2010 The TBT Team. 00005 ** 00006 ** This program is free software; you can redistribute it and/or 00007 ** modify it under the terms of the GNU General Public License 00008 ** as published by the Free Software Foundation; either version 2 00009 ** of the License, or (at your option) any later version. 00010 ** 00011 ** The complete GNU General Public Licence Notice can be found as the 00012 ** `NOTICE' file in the root directory. 00013 ** 00014 ** The TBT Team consists of people listed in the `AUTHORS' file. 00015 */ 00016 00017 #ifndef CTEAM_HH_ 00018 # define CTEAM_HH_ 00019 00020 # include "CPlayer.hh" 00021 # include "Team.hh" 00022 # include "xml/xml_formation.hh" 00023 # include "xml/xml_team.hh" 00024 00025 class CRules; 00026 class CPlayerMsg; 00027 00032 class CTeam : public Team<CPlayer> 00033 { 00034 public: 00035 CTeam(int team_id, CRules *r, CPlayerMsg *pm); 00036 virtual ~CTeam(); 00037 00039 void loadConfig(const std::string& team_file); 00040 00042 void loadPlayerConfig(xml::XMLTeam& team, int player_id); 00043 00048 void placeTeam(int formation_id); 00049 00052 int beginAction(CPlayer* p, enum eAction action); 00053 00055 int endAction(); 00056 00057 // Called by CTeamMsg. 00058 void msgTeamInfo(const MsgTeamInfo* m); 00059 void msgPlayerCreate(const MsgPlayerCreate* m); 00060 void msgAction(const MsgAction* m); 00061 void msgReroll(const MsgReroll* m); 00062 void msgTouchdooown(const MsgTouchdooown* m); 00063 00064 private: 00065 CRules* r_; 00066 CPlayerMsg* pm_; 00067 xml::XMLTeam xml_team_; 00068 xml::XMLFormation xml_formation_; 00069 }; 00070 00071 #endif /* !CTEAM_HH_ */
1.6.3