here is my Items class code:
package finalproject;
public interface Items {
public void useItem(Game game);
.
.
.
}
it's an interface, but here is a class that implements Items
package finalproject;
public class HealthPotion implements Items{
public void useItem(Game game){
int health = game.getHealth() + 50;
if(health >= 100){
game.setHealth(100);
System.out.println("your health has increase to 100");
}
else{ game.setHealth(health);
System.out.println("your health has increased to "+ health);
}
}
}
Thanks!
Felissa