00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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
00031
00032 Player(Team* team);
00033 virtual ~Player();
00034
00035 void reset();
00036
00037
00038
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
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
00101
00102 bool validateCharacteristicUpdate(int newVal, int positionVal);
00103
00104
00105
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