From 3277225c759a9b6a5e74b5c48860bc09079df9cf Mon Sep 17 00:00:00 2001 From: Gavin Li Date: Thu, 12 Feb 2015 17:19:33 -0500 Subject: [PATCH] Finished updating Item class --- MerchantRPGCSE2102/src/game/Item.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/MerchantRPGCSE2102/src/game/Item.java b/MerchantRPGCSE2102/src/game/Item.java index 5c2099c..058bc54 100644 --- a/MerchantRPGCSE2102/src/game/Item.java +++ b/MerchantRPGCSE2102/src/game/Item.java @@ -17,6 +17,17 @@ public Item(String itemName, int basePrice, int maxPrice, int minPrice) _minPrice = minPrice; _adjustedPrice = _basePrice; } + + //second Item constructor + //if max and min prices are not specified, assigns highest possible price and lowest possible price + //to the two variables respectively + public Item(String itemName, int basePrice) + { + _name = itemName; + _basePrice = basePrice; + _maxPrice = 100000; //maximum price + _minPrice = 0; + } //will set the adjusted price of the item based off of the daily percent of the merchant //will need the daily percent as an input from merchant