de.hattrickorganizer.logik
Class InjuryCalculator

java.lang.Object
  extended by de.hattrickorganizer.logik.InjuryCalculator

public final class InjuryCalculator
extends java.lang.Object

The Main Injury Calculator

Author:
draghetto

Method Summary
static double getDoctorNumber(int age, double injury, double target, double updates)
          Returns the estimated doctor number
static double getUpdateNumber(int age, double injury, double target, int doctors)
          Returns the estimated update number
static double getUpdateTSINumber(double tsiPre, double tsiPost, double target, double tsi)
          Returns the exact update number
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDoctorNumber

public static double getDoctorNumber(int age,
                                     double injury,
                                     double target,
                                     double updates)
Returns the estimated doctor number

Parameters:
age - player's age
injury - actual injury level
target - desired injury level
updates - number of updates
Returns:
The number of doctor for the player to fullfil the passed parameters

getUpdateNumber

public static double getUpdateNumber(int age,
                                     double injury,
                                     double target,
                                     int doctors)
Returns the estimated update number

Parameters:
age - player's age
injury - actual injury level
target - desired injury level
doctors - number of doctors
Returns:
The number of update for the player to fullfil the passed parameters

getUpdateTSINumber

public static double getUpdateTSINumber(double tsiPre,
                                        double tsiPost,
                                        double target,
                                        double tsi)
Returns the exact update number

Parameters:
tsiPre - TSI Before injury
tsiPost - TSI After injury, but before a training
target - desired injury level
tsi - TSI gained last update
Returns:
The number of update for the player to fullfil the passed parameters