Esempio n. 1
0
 public String toString() {
   String str = "";
   int i = 0;
   for (Gear g : gear) {
     str += WornSlot.getSlotTitle(i) + ": " + g + '\n';
     i++;
   }
   return str;
 }
Esempio n. 2
0
 /**
  * Slot is empty boolean.
  *
  * @param slot the slot
  * @return the boolean
  */
 public boolean slotIsEmpty(WornSlot slot) {
   int index = slot.getSlotNumber();
   return (gear[index] == null);
 }
Esempio n. 3
0
 /**
  * Gets from slot.
  *
  * @param slot the slot
  * @return the from slot
  */
 public Gear getFromSlot(WornSlot slot) {
   return gear[slot.getSlotNumber()];
 }
Esempio n. 4
0
 /**
  * ************ Specific Methods
  *
  * @param g the g
  * @return the boolean
  */
 public boolean contains(Gear g) {
   WornSlot slot = g.getSlot();
   return gear[slot.getSlotNumber()].equals(g);
 }