de.hattrickorganizer.logik
Class FutureTrainingManager

java.lang.Object
  extended by de.hattrickorganizer.logik.FutureTrainingManager
All Implemented Interfaces:
IFutureTrainingManager

public class FutureTrainingManager
extends java.lang.Object
implements IFutureTrainingManager

Class that manages the prevision of training effect in the future

Author:
Draghetto

Field Summary
 double[] actual
          Actual Training sub
 int[] finalSkillup
          Number of skillup with maximum training
 double[] finalSub
          Maximum training sub after future trainings
 
Fields inherited from interface plugins.IFutureTrainingManager
FUTUREWEEKS
 
Constructor Summary
FutureTrainingManager(ISpieler p, java.util.List trainings, int cotrainer, int keeper, int trainerLvl)
          Calculates the effects of the future trainings for the provided player
 
Method Summary
 double[] getActual()
          Get the array of the actual training sub
 java.util.List getFutureSkillups()
          Returns a list of all future skillups as predicted
 double[] getMax()
          Get the array of the maximum training sub
 int[] getMaxup()
          Get the array of the maximum number of skillup
 IFuturePlayer previewPlayer(int weekNumber)
          Return the predicted player skills after n weeks
 IFuturePlayer previewPlayer(int startWeekNumber, int finalWeekNumber)
          Return the predicted player skills after n weeks
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

actual

public double[] actual
Actual Training sub


finalSub

public double[] finalSub
Maximum training sub after future trainings


finalSkillup

public int[] finalSkillup
Number of skillup with maximum training

Constructor Detail

FutureTrainingManager

public FutureTrainingManager(ISpieler p,
                             java.util.List trainings,
                             int cotrainer,
                             int keeper,
                             int trainerLvl)
Calculates the effects of the future trainings for the provided player

Parameters:
p - The active player
trainings - The future trainings
Method Detail

previewPlayer

public IFuturePlayer previewPlayer(int startWeekNumber,
                                   int finalWeekNumber)
Description copied from interface: IFutureTrainingManager
Return the predicted player skills after n weeks

Specified by:
previewPlayer in interface IFutureTrainingManager
Parameters:
startWeekNumber - week to start calculating training from
finalWeekNumber - week to end calculating training from
Returns:
The prediction

getActual

public double[] getActual()
Get the array of the actual training sub

Returns:

getFutureSkillups

public java.util.List getFutureSkillups()
Returns a list of all future skillups as predicted

Specified by:
getFutureSkillups in interface IFutureTrainingManager
Returns:
List of Skillups

getMax

public double[] getMax()
Get the array of the maximum training sub

Returns:

getMaxup

public int[] getMaxup()
Get the array of the maximum number of skillup

Returns:

previewPlayer

public IFuturePlayer previewPlayer(int weekNumber)
Description copied from interface: IFutureTrainingManager
Return the predicted player skills after n weeks

Specified by:
previewPlayer in interface IFutureTrainingManager
Parameters:
weekNumber - the number of weeks
Returns:
The prediction