Skip to content

Instantly share code, notes, and snippets.

@franksands
Created December 9, 2015 00:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save franksands/4a0c0f55a87be1fd1fa9 to your computer and use it in GitHub Desktop.
Save franksands/4a0c0f55a87be1fd1fa9 to your computer and use it in GitHub Desktop.
public class LivingThing {
public String name;
public int health;
public int magicPoints;
public String attack;
public int hunger;
public LivingThing(String name, int health, int magicPoints, String attack) {
this.name = name;
this.health = health;
this.magicPoints = magicPoints;
this.attack = attack;
this.hunger = 0; // all living things start with hunger level 0
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment