Package oop13.space.model

Examples of oop13.space.model.Model.resetStatistics()


    alienShot.collideWith(model.getList());
    Assert.assertTrue(shipShot.isDead());
    Assert.assertTrue(alienShot.isDead());
   
    //Testing score when aliens die
    model.resetStatistics();
    Alien alien1 = new Alien(new AlienType(1), 50, 30);
    Alien alien2 = new Alien(new AlienType(2), 80, 30);
    Alien alien3 = new Alien(new AlienType(3), 100, 30);
    model.getList().add(alien1);
    model.getList().add(alien2);
View Full Code Here


    alienShot.collideWith(model.getList());
    Assert.assertTrue(shipShot.isDead());
    Assert.assertTrue(alienShot.isDead());
   
    //Testing score when aliens die
    model.resetStatistics();
    Alien alien1 = new Alien(new AlienType(1), 50, 30);
    Alien alien2 = new Alien(new AlienType(2), 80, 30);
    Alien alien3 = new Alien(new AlienType(3), 100, 30);
    model.getList().add(alien1);
    model.getList().add(alien2);
View Full Code Here

    statistics.setAliensKilled(100);
    Assert.assertTrue(statistics.getLevelsCompleted() == 3);
    Assert.assertTrue(statistics.getMotherShipsKilled() == 5);
    Assert.assertTrue(statistics.getScore() == 300);
    Assert.assertTrue(statistics.getAliensKilled() == 100);
    statistics.resetStatistics();
    for (Field f : statistics.getClass().getDeclaredFields()) {
      f.setAccessible(true);
      try {
        Assert.assertTrue(f.getInt(statistics) == 0);
      } catch (IllegalArgumentException e) {
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.