Package items

Examples of items.Clothing


    assertTrue("Store0 Inventory missing Food", R0Store.getInventory().contains(new Food()));
    assertTrue("Store0 Inventory missing Ammo", R0Store.getInventory().contains(new Ammo()));
    assertTrue("Store0 Inventory missing Water", R0Store.getInventory().contains(new Water()));
    assertTrue("Store0 Inventory missing Medicine", R0Store.getInventory().contains(new Medicine()));
    assertTrue("Store0 Inventory missing Axle", R0Store.getInventory().contains(new Axle()));
    assertTrue("Store0 Inventory missing Clothing", R0Store.getInventory().contains(new Clothing()));
    assertTrue("Store0 Inventory missing Oxen", R0Store.getInventory().contains(new Oxen()));
    assertTrue("Store0 Inventory missing Tongue", R0Store.getInventory().contains(new Tongue()));
    assertTrue("Store0 Inventory missing Wheel", R0Store.getInventory().contains(new Wheel()));
    //region 1 with most things available
    assertTrue("Store1 Inventory missing Food", R1Store.getInventory().contains(new Food()));
    assertTrue("Store1 Inventory missing Ammo", R1Store.getInventory().contains(new Ammo()));
    assertTrue("Store1 Inventory missing Water", R1Store.getInventory().contains(new Water()));
    assertTrue("Store1 Inventory missing Medicine", R1Store.getInventory().contains(new Medicine()));
    assertTrue("Store1 Inventory missing Axle", R1Store.getInventory().contains(new Axle()));
    assertFalse("Store1 Inventory not missing Clothing", R1Store.getInventory().contains(new Clothing()));
    assertTrue("Store1 Inventory missing Oxen", R1Store.getInventory().contains(new Oxen()));
    assertTrue("Store1 Inventory missing Tongue", R1Store.getInventory().contains(new Tongue()));
    assertFalse("Store1 Inventory not missing Wheel", R1Store.getInventory().contains(new Wheel()));
    //region 2 with less available
    assertTrue("Store2 Inventory missing Food", R2Store.getInventory().contains(new Food()));
    assertTrue("Store2 Inventory missing Ammo", R2Store.getInventory().contains(new Ammo()));
    assertFalse("Store2 Inventory not missing Water", R2Store.getInventory().contains(new Water()));
    assertFalse("Store2 Inventory not missing Medicine", R2Store.getInventory().contains(new Medicine()));
    assertTrue("Store2 Inventory missing Axle", R2Store.getInventory().contains(new Axle()));
    assertTrue("Store2 Inventory missing Clothing", R2Store.getInventory().contains(new Clothing()));
    assertFalse("Store2 Inventory not missing Oxen", R2Store.getInventory().contains(new Oxen()));
    assertFalse("Store2 Inventory not missing Tongue", R2Store.getInventory().contains(new Tongue()));
    assertTrue("Store2 Inventory missing Wheel", R2Store.getInventory().contains(new Wheel()));
    //region 3 with almost nothing available
    assertTrue("Store3 Inventory missing Food", R3Store.getInventory().contains(new Food()));
    assertFalse("Store3 Inventory not missing Ammo", R3Store.getInventory().contains(new Ammo()));
    assertFalse("Store3 Inventory not missing Water", R3Store.getInventory().contains(new Water()));
    assertTrue("Store3 Inventory missing Medicine", R3Store.getInventory().contains(new Medicine()));
    assertFalse("Store3 Inventory not missing Axle", R3Store.getInventory().contains(new Axle()));
    assertFalse("Store3 Inventory not missing Clothing", R3Store.getInventory().contains(new Clothing()));
    assertTrue("Store3 Inventory missing Oxen", R3Store.getInventory().contains(new Oxen()));
    assertFalse("Store3 Inventory not missing Tongue", R3Store.getInventory().contains(new Tongue()));
    assertFalse("Store3 Inventory not missing Wheel", R3Store.getInventory().contains(new Wheel()));
   
  }
View Full Code Here


    itemInventory[0] = new Ammo();
    itemInventory[1] = new Food();
    itemInventory[2] = new Medicine();
    itemInventory[3] = new Water();
    itemInventory[4] = new Axle();
    itemInventory[5] = new Clothing();
    itemInventory[6] = new Oxen();
    itemInventory[7] = new Tongue();
    itemInventory[8] = new Wheel();
  }
View Full Code Here

  /**
   * Returns the Clothing object in the Inventory if it exists, if not returns null
   * @return Clothing or null depending on the presence of a Clothing object in inventory
   */
  public Clothing getClothing(){
    if(itemInventory[5].equals(new Clothing()))
      return (Clothing) itemInventory[5];
   
    for (int f=0; f<length; f++){
      if (itemInventory[f].equals(new Clothing())){
        return (Clothing) itemInventory[f];
      }
    }
    return null;
  }
View Full Code Here

TOP

Related Classes of items.Clothing

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.