small change

This commit is contained in:
2018-05-22 14:03:31 +02:00
parent 0457f135e4
commit facabe5723
2 changed files with 1 additions and 3 deletions

View File

@@ -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();

View File

@@ -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()