Examples of increaseLives()


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

    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();
   
    //Testing collisions AlienShot -> Ship and Shot -> Alien
    model.getList().add(new AlienShot(spaceShip.getPositionX(), spaceShip.getPositionY()));
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.