Examples of moveIndividual()


Examples of oop13.space.model.AlienShot.moveIndividual()

  private void alienShot() {
    Alien a = model.getAliens().getShooter();
    if (a != null) {
      AlienShot shot = a.fire();
      model.addAlienShot(shot);
            shot.moveIndividual(a.getPositionX() + SHOT_STEP, a.getPositionY());
    }
  }

  @Override
  public void run() {
View Full Code Here

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

        System.err.println(GameStrings.ILLEGAL_ACC_ERROR);
      }
    }
   
    //Testing movement and some methods of ship
    spaceShip.moveIndividual(spaceShip.getPositionX() + 10, spaceShip.getPositionY());
    Assert.assertTrue(spaceShip.getPositionX() == 280);
    spaceShip.moveIndividual(spaceShip.getPositionX() - 260, spaceShip.getPositionY());
    Assert.assertTrue(model.getShip().getPositionX() == 20);
    spaceShip.moveIndividual(spaceShip.getPositionX() - 10, spaceShip.getPositionY());
    Assert.assertTrue(spaceShip.getPositionX() == 20); //reached minimum left movement, the ship position doesn't change
View Full Code Here

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

    }
   
    //Testing movement and some methods of ship
    spaceShip.moveIndividual(spaceShip.getPositionX() + 10, spaceShip.getPositionY());
    Assert.assertTrue(spaceShip.getPositionX() == 280);
    spaceShip.moveIndividual(spaceShip.getPositionX() - 260, spaceShip.getPositionY());
    Assert.assertTrue(model.getShip().getPositionX() == 20);
    spaceShip.moveIndividual(spaceShip.getPositionX() - 10, spaceShip.getPositionY());
    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);
View Full Code Here

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

    //Testing movement and some methods of ship
    spaceShip.moveIndividual(spaceShip.getPositionX() + 10, spaceShip.getPositionY());
    Assert.assertTrue(spaceShip.getPositionX() == 280);
    spaceShip.moveIndividual(spaceShip.getPositionX() - 260, spaceShip.getPositionY());
    Assert.assertTrue(model.getShip().getPositionX() == 20);
    spaceShip.moveIndividual(spaceShip.getPositionX() - 10, spaceShip.getPositionY());
    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
View Full Code Here

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

    Assert.assertTrue(spaceShip.getPositionX() == 280);
    spaceShip.moveIndividual(spaceShip.getPositionX() - 260, spaceShip.getPositionY());
    Assert.assertTrue(model.getShip().getPositionX() == 20);
    spaceShip.moveIndividual(spaceShip.getPositionX() - 10, spaceShip.getPositionY());
    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();
View Full Code Here

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

    Assert.assertTrue(model.getShip().getPositionX() == 20);
    spaceShip.moveIndividual(spaceShip.getPositionX() - 10, spaceShip.getPositionY());
    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();
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.