torphase added

This commit is contained in:
delta1805 2017-09-24 22:33:35 +02:00
parent 9dc5fdc6e2
commit 303641e239
1 changed files with 13 additions and 1 deletions

View File

@ -38,7 +38,7 @@ public class Spiel {
spielzeit++;
movePhase();
attackPhase();
torPhase();
}
private void movePhase(){
@ -189,6 +189,18 @@ public class Spiel {
}
}
public void torPhase(){
if(ballBesitz){
if(b.s.p.getDistance(auswärtsteam.torwart.p)<20){
tor();
}
}else{
if(b.s.p.getDistance(heimteam.torwart.p)<20){
tor();
}
}
}
public void tor(){
if(ballBesitz){
heimteam.tore++;