You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

41 lines
624 B

  1. package structures.basic;
  2. /**
  3. * A basic representation of of the Player. A player
  4. * has health and mana.
  5. *
  6. * @author Dr. Richard McCreadie
  7. *
  8. */
  9. public class Player {
  10. int health;
  11. int mana;
  12. public Player() {
  13. super();
  14. this.health = 20;
  15. this.mana = 0;
  16. }
  17. public Player(int health, int mana) {
  18. super();
  19. this.health = health;
  20. this.mana = mana;
  21. }
  22. public int getHealth() {
  23. return health;
  24. }
  25. public void setHealth(int health) {
  26. this.health = health;
  27. }
  28. public int getMana() {
  29. return mana;
  30. }
  31. public void setMana(int mana) {
  32. this.mana = mana;
  33. }
  34. }