Skip to content

Instantly share code, notes, and snippets.

@Rishit-dagli
Created January 24, 2020 16:16
Show Gist options
  • Save Rishit-dagli/08a00d7c43996beec33441bbed6e3e25 to your computer and use it in GitHub Desktop.
Save Rishit-dagli/08a00d7c43996beec33441bbed6e3e25 to your computer and use it in GitHub Desktop.
public class Monster{
private String name;
private final int MAX_HEALTH = 100;
private static int curr_health = 100;
private double dmg_inf;
private double dmg_taken;
public String getName() {
return name;
}
public void setName(String pName) {
this.name = pName;
}
public String getMaxHp() {
return MAX_HEALTH;
}
public void setCurrHealth(int dmgByEnemy) {
this.health = curr_health - dmgByEnemy;
}
/*
* And many more getters and setters
*/
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment