public void getEnemyInRange () {
        List<Enemy> enemies = detector.getTargetsInRange((int) x, (int) y, (int) range);
        if (enemies.isEmpty()) return; // No enemy in range

        List<Enemy> enemiesInRange = new ArrayList<Enemy>();
        for (Enemy e : enemies) {
            // check distance between this tower and e then shoot bullets
            double dist = Math.sqrt(Math.pow(e.x - x, 2) + Math.pow(e.y - y, 2));
            if (dist < range) {
                enemiesInRange.add(e);
            }
        }

        if (enemiesInRange.isEmpty()) return; // No enemy in range, double check

        if (attackMode == 0) {
            getClosestEnemy(enemiesInRange);
        }
        else if (attackMode == 1) {
            getFurtherestEnemy(enemiesInRange);
        }
        else if (attackMode == 2) {
            getWeakestEnemy(enemiesInRange);
        }
        else if (attackMode == 3) {
            getStrongestEnemy(enemiesInRange);
        }

        // if can't find one, but there is enemy in range
        // assign one
        // if(targetEnemies.isEmpty() && !enemiesInRange.isEmpty()){
        // targetEnemies.add(enemiesInRange.get(0));
        // }
    }