Examples of Warrior


Examples of Character.GCInstances.Warrior

    initBoard.getCase(11, Board.COLUMNS - 1).setCharac(
        new Bowman(raceJ2, J2));

    // Colums of wariors
    for (int i = 2; i < 12; i++) {
      initBoard.getCase(i, 1).setCharac(new Warrior(raceJ1, J1));
      initBoard.getCase(i, Board.COLUMNS - 2).setCharac(
          new Warrior(raceJ2, J2));
    }

  }
View Full Code Here

Examples of model.Warrior

  }
 
  @Test
  public void testAttack(){
    Character c2 = new FlyingKnight("flyingknight");
    Character c3 = new Warrior("warrior");
    c2.setTarget(c3);
    c3.setTarget(c2);
    System.out.println(c2.getCurrentHealth() + " " + c3.getCurrentHealth());
    c2.attack();
    System.out.println(c2.getCurrentHealth() + " " + c3.getCurrentHealth());
    assertTrue(c3.ifAlive() == true);
    c2.attack();
    System.out.println(c2.getCurrentHealth() + " " + c3.getCurrentHealth());
    c2.attack();
    System.out.println(c2.getCurrentHealth() + " " + c3.getCurrentHealth());
    c2.attack();
    System.out.println(c2.getCurrentHealth() + " " + c3.getCurrentHealth());
    assertTrue(c3.ifAlive() == false);
    c3.setHealth(20);
  }
View Full Code Here

Examples of model.Warrior

  }
 
  @Test
  public void testStatus(){
    Character c4 = new Mage("mage");
    Character c3 = new Warrior("warrior");
    c4.setTarget(c3);
    c3.setTarget(c4);
    System.out.println(c4.statusToString());
    assertTrue(c4.getCurrentHealth() == 21);
    c4.addItem(new Elixir());
    c3.attack();
    System.out.println(c4.statusToString());
    assertTrue(c4.getCurrentHealth() == 15);
    c4.useItem(0);
    System.out.println(c4.statusToString());
    assertTrue(c4.getCurrentHealth() == 21);
View Full Code Here

Examples of y3.players.Warrior

    Board b = new Board();
    Player p1 = new Wizard("Arry Poeter", b);
    Player p2 = new Monster("Teletups", b);
    Player p3 = new Monster("Freddy", b);
    Player p4 = new Monster("Kraken", b);
    Player p5 = new Warrior("Don Quixote", b);
    Player p6 = new Warrior("Wolverine", b);
    ThreadViz.showUI();
  }
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.