@@ -0,0 +1,2685 @@
+package engine;%0A%0Aimport java.awt.*;%0A%0A/**%0A *  An entity which allow to have movements.%0A *  It has a speed and a direction.%0A */%0Apublic abstract class AbstractMovableEntity extends Entity implements Movable %7B%0A%0A    /**%0A     *  Entity's speed.%0A     */%0A    private float speed;%0A%0A    /**%0A     *  Entity's direction.%0A     *  It's in degree. It will always be between 0 and 360.%0A     */%0A    private float direction;%0A%0A    /**%0A     *  An empty entity, with null speed and null direction.%0A     */%0A    public AbstractMovableEntity() %7B%0A        super();%0A        speed = 0;%0A        direction = 0;%0A    %7D%0A%0A    /**%0A     *  Construct an entity with the given speed and direction.%0A     *  @param speed entity's speed%0A     *  @param direction entity's direction%0A     */%0A    public AbstractMovableEntity(float speed, float direction) %7B%0A        super();%0A        this.speed = speed;%0A        this.direction = direction;%0A    %7D%0A%0A    /**%0A     *  Create an entity with a start point, a size, a speed and a direction.%0A     *  @param startPosition entity's start position%0A     *  @param size entity's size%0A     *  @param speed entity's speed%0A     *  @param direction entity's direction%0A     */%0A    public AbstractMovableEntity(Point startPosition, Dimension size, float speed, float direction) %7B%0A        super(startPosition, size);%0A        this.speed = speed;%0A        this.direction = direction;%0A    %7D%0A%0A    /**%0A     *  Return entity's speed.%0A     *  @return entity's speed.%0A     */%0A    public float getSpeed() %7B%0A        return speed;%0A    %7D%0A%0A    /**%0A     *  Set the new entity's speed.%0A     *  Negative speed is allowed.%0A     *  @param speed the new speed%0A     */%0A    public void setSpeed(float speed) %7B%0A        this.speed = speed;%0A    %7D%0A%0A    /**%0A     *  Return entity's direction.%0A     *  @return entity's direction%0A     */%0A    public float getDirection() %7B%0A        return direction;%0A    %7D%0A%0A    /**%0A     *  Set the new entity's direction.%0A     *  If the direction is not between 0 and 360, it will be recalculate.%0A     *  Negative degree will be transformed into positive.%0A     *  @param direction%0A     */%0A    public void setDirection(float direction) %7B%0A        direction %25= 360;%0A        this.direction = (direction %3C 0 ? 360 - direction : direction);%0A    %7D%0A%0A    /**%0A     *  Add the new degree for the entity.%0A     *  Does the same thing as : e.setDirection(e.getDirection() + direction);%0A     *  @param direction%0A     */%0A    public void addDirection(float direction) %7B%0A        this.direction += direction;%0A        this.direction =%0A                (this.direction %3C 0 ? 360 - this.direction : this.direction);%0A    %7D%0A%0A    @Override%0A    public abstract void move();%0A%0A    @Override%0A    public abstract void effect();%0A%0A%7D%0A

add an abstract vision of a movable entity to handle speed and position.