torphase added
This commit is contained in:
parent
9dc5fdc6e2
commit
303641e239
|
|
@ -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++;
|
||||
|
|
|
|||
Loading…
Reference in New Issue