Package org.jpokemon.pokemon

Examples of org.jpokemon.pokemon.Type


   * @param t1 First type which may match
   * @param t2 Second type which may match
   * @return Modifier for the strength of the move, given the possibly matched types
   */
  public double STAB(Type t1, Type t2) {
    Type type = type();
    return type == t1 || type == t2 ? 1.5 : 1.0;
  }
View Full Code Here


    parent.validate();
    parent.repaint();
  }

  private void typeSelectorSearch() {
    Type selectedType = typeSelector.getCurrentElement();

    if (selectedType == null) {
      return;
    }

    searchResultsPanel.removeAll();
    nameField.setText(nameFieldDefault);

    Type t1, t2;
    PokemonInfo pokemonInfo;

    for (int i = 1; (pokemonInfo = PokemonInfo.get(i)) != null; i++) {
      t1 = Type.valueOf(pokemonInfo.getType1());
      t2 = Type.valueOf(pokemonInfo.getType2());
View Full Code Here

  public void testPpMax() {
    assertEquals(answers.getPp(), move.pp());
  }

  public void testType() {
    Type type = Type.valueOf(answers.getType());

    assertEquals(type, move.type());
  }
View Full Code Here

    assertTrue(move.reps() == 1);
  }

  public void testSTAB() {
    Type type = Type.valueOf(answers.getType());

    assertEquals(1.5, move.STAB(type, null));

    while (type == Type.valueOf(answers.getType()))
      type = Type.valueOf((int) (Math.random() * Type.values().length));
 
View Full Code Here

TOP

Related Classes of org.jpokemon.pokemon.Type

Copyright © 2018 www.massapicom. 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.