1
0

Projekt Alien Defence von Schick&Kannix eingekauft

This commit is contained in:
Trutz
2021-04-12 17:09:53 +02:00
parent 5f0fd577e9
commit 488bb78d8b
85 changed files with 3994 additions and 2 deletions
+51
View File
@@ -0,0 +1,51 @@
package model;
import java.time.LocalDateTime;
import java.util.Vector;
import toDo.User;
public class Attempt {
// Attribute
private User user;
private Level level;
private int placement;
private double hitsShots;
private double hitsTargets;
private double reactionDuration;
private double highscorePoints;
private LocalDateTime datetime;
// Konstruktor
public Attempt(int place, Level level, double hitsShots, double hitsTargets, double reactionDuration,
double highscoreFormula, User user, LocalDateTime datetime) {
super();
this.placement = place;
this.level = level;
this.reactionDuration = reactionDuration;
this.highscorePoints = highscoreFormula;
this.user = user;
this.hitsShots = hitsShots;
this.hitsTargets = hitsTargets;
this.datetime = datetime;
}
public Vector<String> getRowVector() {
Vector<String> v = new Vector<String>(8);
v.addElement(String.valueOf(this.placement));
v.addElement(this.user.getFirst_name() + " " + this.user.getSur_name());
v.addElement(this.datetime.getDayOfMonth() +"."+this.datetime.getMonthValue() + "." + this.datetime.getYear());;
v.addElement(this.datetime.getHour() + ":" + this.datetime.getMinute());
v.addElement(String.valueOf((int) this.hitsTargets));
v.addElement(String.valueOf((int) this.hitsShots));
v.addElement(String.valueOf((int) this.reactionDuration));
v.addElement(String.valueOf((int) this.highscorePoints));
return v;
}
public Level getLevel() {
return this.level;
}
}