jweinst1
10/3/2015 - 8:21 PM

basic pokemon java class

basic pokemon java class

/**
 * Created by Josh on 10/3/15.
 */
public class Pokemon {
    public static int health;
    public static int att;
    public static int def;
    public Pokemon(int health0, int attack0, int defense0) {
        health = health0;
        att = attack0;
        def = defense0;
    }
    public int damage(int amount) {
        health -= amount;
        return health;
    }
    public static void attack(Pokemon target, int amount) {
        target.damage(amount);
    }
    public static void main(String[] args) {
        Pokemon squirtle = new Pokemon(50,5,10);
        System.out.println(squirtle.health);
    }
}