public class Shop
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
cardPrice |
static float |
cardSellPrice |
static int |
coalPrice |
static float |
coalSellPrice |
static int |
electricPrice |
static float |
electricSellPrice |
static int |
nuclearPrice |
static float |
nuclearSellPrice |
static int |
oilPrice |
static float |
oilSellPrice |
Constructor and Description |
---|
Shop(Player customer)
The initialiser for shop.
|
Modifier and Type | Method and Description |
---|---|
void |
buyCard(boolean testCase)
Purchases a card for the player
|
void |
buyFuel(java.lang.String fuelType,
int quantity,
boolean testCase)
Purchases fuel from the shop using the customer's money.
|
void |
buyNewTrain(Station station) |
void |
lockStation(MapObj mapObj,
boolean testCase) |
void |
repairStation(Station station,
boolean testCase) |
void |
sellFuel(java.lang.String fuelType,
int quantity,
boolean testCase) |
void |
unlockStation(MapObj mapObj,
boolean testCase) |
public static final int coalPrice
public static final float coalSellPrice
public static final int oilPrice
public static final float oilSellPrice
public static final int electricPrice
public static final float electricSellPrice
public static final int nuclearPrice
public static final float nuclearSellPrice
public static final int cardPrice
public static final float cardSellPrice
public Shop(Player customer)
customer
- The player who will be buying and selling things from this shop object.public void buyFuel(java.lang.String fuelType, int quantity, boolean testCase)
fuelType
- The type of fuel as string the player will obtain: "Coal", "Oil", "Electric", "Nuclear"quantity
- The amount of fuel the player will purchasetestCase
- Determines if the run is a testCase or not.public void sellFuel(java.lang.String fuelType, int quantity, boolean testCase)
public void buyCard(boolean testCase)
testCase
- A boolean deciding if this is a testCase run or not.public void repairStation(Station station, boolean testCase)
public void unlockStation(MapObj mapObj, boolean testCase)
public void buyNewTrain(Station station)
public void lockStation(MapObj mapObj, boolean testCase)