package com.javarush.task.task25.task2515;

/**
 * Created by Alexey Vedensky on 07.04.2017.
 * MAIL: avedensky@gmail.com
 */
public class SpaceShip extends BaseObject {
    private double dx;

    public SpaceShip(double x, double y) {
        super(x, y, 3);
        dx = 0;
    }

    public void moveLeft() {
        dx =-1;
    }

    public void moveRight () {
        dx = 1;
    }
}

@@ -318,16 +318,17 @@
     dx =
+ 
 -1;%0A    
@@ -355,17 +355,16 @@
 oveRight
- 
 () %7B%0A   
@@ -374,16 +374,442 @@
   dx = 1
+;%0A    %7D%0A%0A    @Override%0A    public void draw(Canvas canvas) %7B%7D%0A%0A    public void fire() %7B%0A        Rocket rocket1 = new Rocket(x-2,y);%0A        Rocket rocket2 = new Rocket(x+2,y);%0A        Space.game.getRockets().add(rocket1);%0A        Space.game.getRockets().add(rocket2);%0A    %7D%0A%0A    @Override%0A    public void move() %7B%0A        x +=dx;%0A%0A        checkBorders(radius, Space.game.getWidth() - radius + 1, 1, Space.game.getHeight() + 1)
 ;%0A    %7D%0A

Task 2515 13 has done