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