BasicTower has a radius of 3 blocks

This commit is contained in:
Yohann D'ANELLO 2020-02-25 11:02:01 +01:00
parent f16ecc332b
commit b97f662d70
1 changed files with 2 additions and 1 deletions

View File

@ -34,7 +34,8 @@ public class BasicTower extends Tower {
List<Mob> filtered = new ArrayList<>();
for (Mob mob : mobs) {
if (mob.getX() == getX() || mob.getY() == getY())
if ((mob.getX() == getX() || mob.getY() == getY())
&& Math.abs(mob.getX() - getX()) <= 3 && Math.abs(mob.getY() - getY()) <= 3)
filtered.add(mob);
}