-
Notifications
You must be signed in to change notification settings - Fork 0
/
mlbPlayer.h
219 lines (206 loc) · 4.56 KB
/
mlbPlayer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
#include <string>
#include <iostream>
//creating a record to input data from "http://rotoguru1.com/cgi-bin/byday.pl?date=405&game=dk"
//
using namespace std;
class mlbPlayer{
string Date;
int GID;
int MLB_ID;
string Name;
string LastName;
int Starter;
int Batorder;
string DKposn;
float DKpts;
int DKsal;
string Team;
string Oppt;
int dblhdr;
int TmRuns;
int OppRuns;
string Statline;
string BvP;
string shortBvP;
int atBats;
float ProjectionScore;
int Hits;
int base2;
int base3;
int HomeRuns;
int RBI;
int BB;
int SO;
int SB;
int CS;
float AVG;
float OBP;
float SLG;
float OPS;
float wOBA;
string batLHS;
string homeaway;
string pitcherHand;
int game1Pts;
int game2Pts;
int game3Pts;
int game4Pts;
int FinalPts;
string debug;
float seasonAVG;
float seasonOPS;
float seasonOBP;
float seasonWOBA;
int seasonSB;
int seasonCS;
int seasonGames;
int seasonHomeRuns;
float HRrFlyballs;
string startingPitcher;
float strikeOutPerecent;
float walkPercent;
float wSB;
float wRC;
float wRAA;
float gbPercent;
float fbPercent;
float BBpK; // BB/K rate
public:
mlbPlayer();
void setDate(string d);
string getDate();
void setGID(int gID);
int getGID();
void setMLB_ID(int id);
int getMLB_ID();
void setName(string name);
void setLastName(string name);
string getLastName();
string getName();
void setStarter(bool x);
bool isStarter();
void setBatOrder(int x);
int getBatOrder();
void setDkPosn(string x);
string getDkPosn();
void setDkpts(float x);
float getDkpts();
void setDKsal(int x);
int getDKsal();
void setTeam(string x);
string getTeam();
void setOppt(string x);
string getOppt();
void doubleHeader(bool x);
bool isDoubleHeader();
void setTeamRuns(int x);
int getTeamRuns();
void setOpptRuns(int x);
int getOpptRuns();
void setStatLine(string x);
string getStateLine();
string getBvP();
void setBvP(string x);
string getShortBvP();
void setShortBvP(string x);
void setAtBats(int x);
int getAtBats();
float getProjectionScore();
void setProjectionScore(float x);
void setHits(int x);
int getHits();
void setDoubles(int x);
int getDoubles();
void setTriples(int x);
int getTriples();
void setHomeRuns(int x);
int getHomeRuns();
void setRBI(int x);
int getRBI();
void setBB(int x);
int getBB();
void setSO(int x);
int getSO();
void setSB(int x);
int getSB();
void setCS(int x);
int getCS();
void setAVG(float x);
float getAVG();
void setOBP(float x);
float getOBP();
void setSLG(float x);
float getSLG();
void setOPS(float x);
float getOPS();
void setHomeAway(string x);
string getHomeAway();
void setBatLRS(string x);
string getBatLRS();
void setPitcherHand(string x);
string getPitcherHand();
void setGame1Pts(int x);
int getGame1Pts();
void setGame2Pts(int x);
int getGame2Pts();
void setGame3Pts(int x);
int getGame3Pts();
void setGame4Pts(int x);
int getGame4Pts();
string getDebug();
void setDebug(string x);
//added
void setSeasonWOBA(float x);
float getSeasonWOBA();
void setSeasonAVG(float x);
float getSeasonAVG();
void setSeasonOBP(float x);
float getSeasonOBP();
void setSeasonOPS(float x);
float getSeasonOPS();
void setSeasonSB(int x);
void setSeasonCS(int x);
int getSeasonSB();
int getSeasonCS();
void setSeasonGames(int x);
int getSeasonGames();
//final to see how it did
int getFinalPts();
void setFinalPts(int x);
//added 5.15.2015
int getSeasonHR();
void setSeasonHR(int x);
float getSeasonHRrFlyball();
void setSeasonHRrFlyball(float x);
void setStartingPitcher(string x);
string getStartingPitcher();
float getWalkPercent();
void setWalkPercent(float x);
float getStrikeOutPerecent();
void setStrikeOutPercent(float x);
void set_wRC(float x);
float get_wRC();
void set_wRAA(float x);
float get_wRAA();
void set_wSB(float x);
float get_wSB();
void set_gbPercent(float x);
float get_gbPercent();
void set_fbPercent(float x);
float get_fbPercent();
float get_BBpK();
void set_BBpK(float x);
bool sortByProjection(const mlbPlayer &lhs, const mlbPlayer &rhs){ return lhs.ProjectionScore < rhs.ProjectionScore;}
bool sortByPosition(const mlbPlayer &lhs, const mlbPlayer &rhs){ return lhs.DKposn < rhs.DKposn;}
// use to sort by salary - Not sure how this is working need to learn more
struct compareMyDataFunctor : public binary_function<mlbPlayer, mlbPlayer, bool>{
bool operator()( mlbPlayer lhs, mlbPlayer rhs){
return (lhs.ProjectionScore > rhs.ProjectionScore);
}
};
struct SortPosition : public binary_function<mlbPlayer, mlbPlayer, bool>{
bool operator()( mlbPlayer lhs, mlbPlayer rhs){
return (lhs.DKposn > rhs.DKposn);
}
};
};