Package model

Examples of model.Character.addItem()


  @Test
  public void Elixir() {
    System.out.println();
    Character Greg = new Archer("Greg");
    Greg.addItem(new Elixir());
    int initialHealth = Greg.getHealth();
    System.out.println("Before: " + Greg.inventoryToString());
    Greg.useItem(0);
    int finalHealth = Greg.getHealth();
    System.out.println("After: " + Greg.inventoryToString());
View Full Code Here


 
  @Test
  public void PowerRing() {
    System.out.println();
    Character Greg = new Archer("Greg");
    Greg.addItem(new PowerRing());
    int initialAttack = Greg.getAttack();
    System.out.println("Before: " + Greg.inventoryToString());
    Greg.useItem(0);
    int finalAttack = Greg.getAttack();
    System.out.println("After: " + Greg.inventoryToString());
View Full Code Here

 
  @Test
  public void Boots() {
    System.out.println();
    Character Greg = new Archer("Greg");
    Greg.addItem(new Boots());
    int initialMovement = Greg.getMove();
    System.out.println("Before: " + Greg.inventoryToString());
    Greg.useItem(0);
    int finalMovement = Greg.getMove();
    System.out.println("After: " + Greg.inventoryToString());
View Full Code Here

 
  @Test
  public void HoldingMultipleItems() {
    System.out.println();
    Character Greg = new Archer("Greg");
    Greg.addItem(new Boots());
    Greg.addItem(new PowerRing());
    Greg.addItem(new Elixir());
    Greg.addItem(new PowerRing());
    System.out.println("Holding Four Items: " + Greg.inventoryToString());
  }
View Full Code Here

  @Test
  public void HoldingMultipleItems() {
    System.out.println();
    Character Greg = new Archer("Greg");
    Greg.addItem(new Boots());
    Greg.addItem(new PowerRing());
    Greg.addItem(new Elixir());
    Greg.addItem(new PowerRing());
    System.out.println("Holding Four Items: " + Greg.inventoryToString());
  }
View Full Code Here

  public void HoldingMultipleItems() {
    System.out.println();
    Character Greg = new Archer("Greg");
    Greg.addItem(new Boots());
    Greg.addItem(new PowerRing());
    Greg.addItem(new Elixir());
    Greg.addItem(new PowerRing());
    System.out.println("Holding Four Items: " + Greg.inventoryToString());
  }

}
View Full Code Here

    System.out.println();
    Character Greg = new Archer("Greg");
    Greg.addItem(new Boots());
    Greg.addItem(new PowerRing());
    Greg.addItem(new Elixir());
    Greg.addItem(new PowerRing());
    System.out.println("Holding Four Items: " + Greg.inventoryToString());
  }

}
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.