LS03-04-2: Highscoreberechnung
This commit is contained in:
@@ -34,13 +34,13 @@ public class AttemptController {
|
||||
}
|
||||
|
||||
/**
|
||||
* calculates points from attempt for highscore TODO create formula here
|
||||
* calculates points from attempt for highscore
|
||||
*
|
||||
* @param level Levelobjekt
|
||||
* @param hitcounter Controllerobjekt das die Treffer und Reaktionszeiten misst
|
||||
* @return points
|
||||
*/
|
||||
public int calculatePoints(Level level, HitCounter hitcounter) {
|
||||
return -1;
|
||||
return (int) ((hitcounter.getHit()/level.getTargets().size())* 400L +(hitcounter.getHit()/hitcounter.getShots())* 200L +(1000-(hitcounter.getReactionTime()/hitcounter.getSumReactionDiffernce())*400));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user