package main.java.engine.objects.tower;

import java.awt.geom.Point2D;
import java.io.Serializable;
import java.util.Map;

import main.java.engine.objects.TDObject;
import main.java.engine.objects.monster.Monster;
import main.java.engine.objects.projectile.DamageProjectile;
import main.java.engine.objects.projectile.FreezeProjectile;
import main.java.schema.tdobjects.TowerSchema;

/**
 * 
 * Towers that do not aim at particular monster(s)
 * but just shoot in all direction
 *
 */
public class SplashTower extends ShootingTower {

    public static final double[] SPLASH_X = { 0.0, 0.0, -4.0, 4.0, 2.0, -2.0, 2.0, -2.0};
    public static final double[] SPLASH_Y = { -4.0, 4.0, 0.0, 0.0, 2.0, -2.0, -2.0, 2.0};
	
	public SplashTower(ITower baseTower, Map<String, Serializable> attributes) {
		super(baseTower, attributes);
	}
	
    @Override
    public void fireProjectile (double angle) {
    	for (int i = 0; i < SPLASH_X.length; i++) {
            new DamageProjectile(
            		((SimpleTower) baseTower).centerCoordinate().getX(),
            		((SimpleTower) baseTower).centerCoordinate().getY(),
            		SPLASH_X[i], SPLASH_Y[i], myDamage, myBulletImage);
        }
    }

}

@@ -207,16 +207,65 @@
 onster;%0A
+import main.java.engine.objects.projectile.Bomb;%0A
 import m
@@ -309,32 +309,32 @@
 mageProjectile;%0A
-
 import main.java
@@ -579,189 +579,8 @@
 er %7B
-%0A%0A    public static final double%5B%5D SPLASH_X = %7B 0.0, 0.0, -4.0, 4.0, 2.0, -2.0, 2.0, -2.0%7D;%0A    public static final double%5B%5D SPLASH_Y = %7B -4.0, 4.0, 0.0, 0.0, 2.0, -2.0, -2.0, 2.0%7D;
 %0A%09%0A%09
@@ -780,22 +780,31 @@
  0; i %3C 
-SPLASH
+Bomb.BOMB_SPRAY
 _X.lengt
@@ -999,27 +999,45 @@
   %09%09
-SPLASH_X%5Bi%5D, SPLASH
+Bomb.BOMB_SPRAY_X%5Bi%5D, Bomb.BOMB_SPRAY
 _Y%5Bi

Remove duplicated code in SplashTower