Examples of decreaseLives()


Examples of oop13.space.model.Ship.decreaseLives()

    Assert.assertTrue(spaceShip.getPositionX() == 20); //reached minimum left movement, the ship position doesn't change
    spaceShip.moveIndividual(spaceShip.getPositionX() + 520, spaceShip.getPositionY());
    Assert.assertTrue(spaceShip.getPositionX() == 540);
    spaceShip.moveIndividual(spaceShip.getPositionX() + 10, spaceShip.getPositionY());
    Assert.assertTrue(spaceShip.getPositionX() == 540); // reached maximum right movement, the ship position doesn't change
    spaceShip.decreaseLives();
    spaceShip.decreaseLives();
    Assert.assertTrue(spaceShip.getLives() == 1);
    spaceShip.increaseLives();
    Assert.assertTrue(spaceShip.getLives() == 2);
    spaceShip.decreaseLives();
View Full Code Here

Examples of oop13.space.model.Ship.decreaseLives()

    spaceShip.moveIndividual(spaceShip.getPositionX() + 520, spaceShip.getPositionY());
    Assert.assertTrue(spaceShip.getPositionX() == 540);
    spaceShip.moveIndividual(spaceShip.getPositionX() + 10, spaceShip.getPositionY());
    Assert.assertTrue(spaceShip.getPositionX() == 540); // reached maximum right movement, the ship position doesn't change
    spaceShip.decreaseLives();
    spaceShip.decreaseLives();
    Assert.assertTrue(spaceShip.getLives() == 1);
    spaceShip.increaseLives();
    Assert.assertTrue(spaceShip.getLives() == 2);
    spaceShip.decreaseLives();
   
View Full Code Here

Examples of oop13.space.model.Ship.decreaseLives()

    spaceShip.decreaseLives();
    spaceShip.decreaseLives();
    Assert.assertTrue(spaceShip.getLives() == 1);
    spaceShip.increaseLives();
    Assert.assertTrue(spaceShip.getLives() == 2);
    spaceShip.decreaseLives();
   
    //Testing collisions AlienShot -> Ship and Shot -> Alien
    model.getList().add(new AlienShot(spaceShip.getPositionX(), spaceShip.getPositionY()));
    ShipShot shot = new ShipShot(10, 50);
    model.getList().add(shot);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.