This commit is contained in:
GordonDaFreeman 2017-09-20 18:31:21 +02:00
parent d4585195e3
commit 563aed745a
4 changed files with 33 additions and 7 deletions

View File

@ -1,7 +1,9 @@
package fußballmanager;
import java.util.Timer;
import java.util.TimerTask;
public class Main {
public static void main(String[] args) {
}
}

View File

@ -13,21 +13,34 @@ public class Spiel {
Team heimteam;
Team auswärtsteam;
Schiedsrichter schiri;
boolean werAnstoss;
//true = heim | false = auswärts
boolean ballBesitz;
public Spiel(Team heim, Team aus, Schiedsrichter s) {
this.heimteam = heim;
this.auswärtsteam = aus;
this.schiri = s;
werAnstoss = ((int) Math.random()) == 0 ? true : false;
ballBesitz = ((int) Math.random()) == 0 ? true : false;
spielzeit = 0;
}
public void tick() {
spielzeit++;
movePhase();
attackPhase();
}
private void movePhase(){
}
private void attackPhase(){
}
public String getSpielzeit() {
String r = "";
NumberFormat numberFormat = new DecimalFormat("0");

View File

@ -1,13 +1,11 @@
package fußballmanager.personen;
import fußballmanager.Position;
import fußballmanager.Team;
public abstract class Person {
int alter;
Team team;
String name,vorname;
Position p;
public void setTeam(Team team){
this.team = team;

View File

@ -2,12 +2,25 @@ package fu
import java.util.Random;
import fußballmanager.Position;
public class Spieler extends Person {
int stärke;
int verteidigung;
int tore;
int motivation;
double geschwindigkeit;
Position p;
Ball b;
public void setBall(Ball b){
this.b = b;
}
public void takeBall(Spieler s){
b = s.b;
s.b = null;
}
public Spieler(int stärke, int verteidigung, int alter, String vorname,
String name) {