protected static Trooper getMainEnemy(Game game, World world, Trooper self, Move move) {
        Trooper mainTarget = null;

        for (Trooper trooper : getNearestEnemies(world)) {
            if (isShotWillDeny(game, world, self, move)) {

                return trooper;


            } else if (trooper.getId() == MAIN_ENEMY_ID && trooper.getHitpoints() > 0) {
                if (canAttack(self, trooper, world)) {
                    MAIN_ENEMY_ID = trooper.getId();
                    return trooper;
                }

            } else if (canAttack(self, trooper, world)) {

                if (mainTarget == null) {
                    mainTarget = trooper;
                }
                if (mainTarget.getHitpoints() > trooper.getHitpoints()) {

                    mainTarget = trooper;
                }


            }

        }


        return mainTarget;
    }