Update Spieler

This commit is contained in:
BuildTools 2017-09-15 16:02:18 +02:00
parent 95ef8437c1
commit e39483c9c8
1 changed files with 6 additions and 4 deletions

View File

@ -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";
} }