|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.hattrickorganizer.logik.TrainingPoint
public class TrainingPoint
Class that manages the relation between position and training points It also is manages the calculation of played minutes for a player and its relation to the base points.
| Constructor Summary | |
|---|---|
TrainingPoint()
Creates a new TrainingPoint object. |
|
TrainingPoint(int year,
int week,
int type,
int intensity,
int staminaTrainingPart)
|
|
TrainingPoint(ITrainingWeek trainWeek)
|
|
| Method Summary | |
|---|---|
void |
addTrainingMatch(int minutes,
int posId)
Adds a match to the internal list |
double |
calcTrainingPoints(boolean ignorePosition)
Calculate how many points the player gets for this week, using the matches previously added with addTrainingMatch(min, posId) Optimal: 100% position + 90mins -> points = 1.0 |
java.lang.Double |
getTrainingPoint(int trtype,
java.lang.Integer playerMatchPosition)
Mathod that returns the correct training point |
ITrainingWeek |
getTrainWeek()
Returns the training week for this training point |
void |
setTrainWeek(ITrainingWeek trainWeek)
Sets the training week for this training point |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TrainingPoint()
public TrainingPoint(ITrainingWeek trainWeek)
public TrainingPoint(int year,
int week,
int type,
int intensity,
int staminaTrainingPart)
| Method Detail |
|---|
public final java.lang.Double getTrainingPoint(int trtype,
java.lang.Integer playerMatchPosition)
getTrainingPoint in interface ITrainingPointtrtype - Training type codeplayerMatchPosition - player position code
public void addTrainingMatch(int minutes,
int posId)
addTrainingMatch in interface ITrainingPointminutes - How long was the player on the field in this matchposId - Position of the player in this matchpublic double calcTrainingPoints(boolean ignorePosition)
calcTrainingPoints in interface ITrainingPointignorePosition - Ignore players position, otherwise use only minutes on correct position
public ITrainingWeek getTrainWeek()
getTrainWeek in interface ITrainingPointpublic void setTrainWeek(ITrainingWeek trainWeek)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||