small change
This commit is contained in:
@@ -154,7 +154,6 @@ public abstract class Projectile extends GameObject {
|
||||
|
||||
public void hit(Worm... worm){
|
||||
for (Worm wormA : worm){
|
||||
//TODO bazooka: hitpoints multiplied with force?
|
||||
wormA.decreaseHitPoints(getHitPoints());
|
||||
}
|
||||
terminate();
|
||||
|
@@ -83,8 +83,7 @@ public class Team {
|
||||
Collection<Worm> worms = getAllWormsOfTeam();
|
||||
|
||||
for (Worm w : worm) {
|
||||
if (w == null || w.getTeam() != null) return false;
|
||||
if (!names.add(w.getName())) return false;
|
||||
if (w == null || w.getTeam() != null || !names.add(w.getName())) return false;
|
||||
if (worms.contains(w)) return false;
|
||||
if (worms.size() == 0 && !w.isTerminated()) continue;
|
||||
if (w.getMass() < getMinMassTeam() / 2 || w.getMass() > 2 * getMinMassTeam()
|
||||
|
Reference in New Issue
Block a user