CTeam.hh

00001 /*
00002 ** TowBowlTactics, an adaptation of the tabletop game Blood Bowl.
00003 ** 
00004 ** Copyright (C) 2006, 2007 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_team.hh"
00023 # include "xml/xml_formation.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 declareAction(CPlayer* p, enum eDeclaredAction action);
00053 
00054   // Called by CTeamMsg.
00055   void msgTeamInfo(const MsgTeamInfo* m);
00056   void msgPlayerCreate(const MsgPlayerCreate* m);
00057   void msgReroll(const MsgReroll* m);
00058   void msgTouchdooown(const MsgTouchdooown* m);
00059 
00060 private:
00061   CRules* r_;
00062   CPlayerMsg* pm_;
00063   xml::XMLTeam xml_team_;
00064   xml::XMLFormation xml_formation_;
00065 };
00066 
00067 #endif /* !CTEAM_HH_ */

Generated on Sat Jun 23 16:07:23 2007 for Stechec/TBT by  doxygen 1.4.7