Update Spieler
This commit is contained in:
parent
95ef8437c1
commit
e39483c9c8
|
|
@ -7,6 +7,7 @@ public class Spieler extends Person {
|
||||||
int verteidigung;
|
int verteidigung;
|
||||||
int tore;
|
int tore;
|
||||||
int motivation;
|
int motivation;
|
||||||
|
double geschwindigkeit;
|
||||||
|
|
||||||
public Spieler(int stärke, int verteidigung, int alter, String vorname,
|
public Spieler(int stärke, int verteidigung, int alter, String vorname,
|
||||||
String name) {
|
String name) {
|
||||||
|
|
@ -18,9 +19,10 @@ public class Spieler extends Person {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Spieler() {
|
public Spieler() {
|
||||||
this.stärke = new Random().nextInt(100);
|
int random = new Random().nextInt(100);
|
||||||
this.verteidigung = new Random().nextInt(100);
|
this.verteidigung = random;
|
||||||
this.alter = new Random().nextInt(100);
|
this.stärke = 100-random;
|
||||||
|
this.geschwindigkeit = 4+Math.random()*2;
|
||||||
this.vorname = "Hans";
|
this.vorname = "Hans";
|
||||||
this.name = "Wurst";
|
this.name = "Wurst";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue