Exemplo n.º 1
0
 /** Removes the sword owned from the player's inventory */
 public void removeSword() {
   Sys.print("You have lost your " + sword.getName() + "!");
   sword = null;
 }
Exemplo n.º 2
0
 /**
  * Adds a specified sword to the player's inventory
  *
  * @param s - Specified sword
  */
 public void addSword(Sword s) {
   Sys.print("You have obtained a " + s.getName() + "!");
   sword = s;
 }