teamroster2/common/Player.hh

00001 /*
00002 ** TowBowlTactics, an adaptation of the tabletop game Blood Bowl.
00003 ** 
00004 ** Copyright (C) 2006 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 #ifndef PLAYER_HH_
00017 #define PLAYER_HH_
00018 
00019 #include <vector>
00020 #include <string>
00021 
00022 #include "Position.hh"
00023 
00024 class Team;
00025 
00026 class Player
00027 {
00028 public:
00029     // -----------------------------------------------------------------------
00030     //  Constructors
00031     // -----------------------------------------------------------------------
00032     Player(Team* team);
00033     virtual ~Player();
00034     
00035     void reset();
00036     
00037     // -----------------------------------------------------------------------
00038     //  Getters & Setters
00039     // -----------------------------------------------------------------------
00040     
00041     Team* getTeam();
00042     const char* getName();
00043     void setName(const char* name);  
00044     const char* getPositionTitle();
00045     void setPosition(const char* posistionTitle);
00046     Position* getPosition();
00047     int getMovementAllowance();
00048     void setMovementAllowance(int ma);
00049     int getStrength();
00050     void setStrength(int st);
00051     int getAgility();
00052     void setAgility(int ag);
00053     int getArmourValue();
00054     void setArmourValue(int av);
00055     
00056     // Return all the player's skills (normal + double)
00057     std::vector <const char*> getSkills();
00058     
00059     std::vector <const char*> getSkillsNormal();
00060     std::vector <const char*> getSkillsDouble();
00061     
00062     void removeAllSkillsNormal();
00063     void removeAllSkillsDouble();
00064     void addSkillNormal(const char* skill);
00065     void addSkillDouble(const char* skill);
00066     const char* getSkillsAsString();    
00067     
00068     const char* getDisplay();
00069     void setDisplay(const char* display);
00070     
00071     bool getMissNextMatch();
00072     void setMissNextMatch(bool b);
00073     int getNigglingInjuries();
00074     void setNigglingInjuries(int ni);
00075     int getMaReducted();
00076     void setMaReducted(int n);
00077     int getAvReducted();
00078     void setAvReducted(int n);
00079     int getAgReducted();
00080     void setAgReducted(int n);
00081     int getStReducted();
00082     void setStReducted(int n);
00083     const char* getInjuriesAsString();
00084     
00085     int getCompletions();
00086     void setCompletions(int com);
00087     int getTouchDowns();
00088     void setTouchDowns(int td);
00089     int getInterceptions();
00090     void setInterceptions(int in);
00091     int getCasualties();
00092     void setCasualties(int ca);
00093     int getMostValuablePlayer();
00094     void setMostValuablePlayer(int mvp);
00095     int getStarPlayerPoints();
00096     long getValue();
00097     
00098 private:
00099     // -----------------------------------------------------------------------
00100     //  Private methods
00101     // -----------------------------------------------------------------------
00102     bool validateCharacteristicUpdate(int newVal, int positionVal);
00103 
00104     // -----------------------------------------------------------------------
00105     //  Private data members
00106     // -----------------------------------------------------------------------
00107     Team* team_;
00108     std::string name_;
00109     std::string positionTitle_;
00110     int movementAllowance_;
00111     int strength_;
00112     int agility_;
00113     int armourValue_;
00114     std::vector<const char*> vSkills_;
00115     std::vector<const char*> vSkillsDouble_;
00116     
00117     bool missNextMatch_;
00118     int nigglingInjuries_;
00119     int maReducted_;
00120     int avReducted_;
00121     int agReducted_;
00122     int stReducted_;
00123      
00124     int completions_;
00125     int touchdowns_;
00126     int interceptions_;
00127     int casualties_;
00128     int mostValuablePlayer_;
00129     long value_;   
00130     std::string display_;
00131 };
00132     
00133 
00134 #endif /*PLAYER_HH_*/

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