|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.TeamHEC.LocomotionCommotion.Player.Shop
public class Shop
Field Summary | |
---|---|
static int |
cardPrice
|
static float |
cardSellPrice
|
static int |
coalPrice
|
static float |
coalSellPrice
|
static int |
coalTrainPrice
|
static int |
coalTrainSellPrice
|
static int |
electricPrice
|
static float |
electricSellPrice
|
static int |
electricTrainPrice
|
static int |
electricTrainSellPrice
|
static int |
nuclearPrice
|
static float |
nuclearSellPrice
|
static int |
nuclearTrainPrice
|
static int |
nuclearTrainSellPrice
|
static int |
oilPrice
|
static float |
oilSellPrice
|
static int |
oilTrainPrice
|
static int |
oilTrainSellPrice
|
Constructor Summary | |
---|---|
Shop(Player customer)
The initialiser for shop. |
Method Summary | |
---|---|
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 |
buyTrain(java.lang.String trainType,
int quantity,
boolean testCase)
lets a player buy a train. |
void |
repairStation(Station station,
boolean testCase)
Repairs a specified station. |
void |
sellFuel(java.lang.String fuelType,
int quantity,
boolean testCase)
|
void |
upgradeStation(Station station,
boolean testCase)
Upgrades a station Reduces the player's gold by the cost of upgrading a station and increases the station level by 1 |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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 coalTrainPrice
public static final int coalTrainSellPrice
public static final int oilTrainPrice
public static final int oilTrainSellPrice
public static final int electricTrainPrice
public static final int electricTrainSellPrice
public static final int nuclearTrainPrice
public static final int nuclearTrainSellPrice
public static final int cardPrice
public static final float cardSellPrice
Constructor Detail |
---|
public Shop(Player customer)
customer
- The player who will be buying and selling things from this shop object.Method Detail |
---|
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 buyTrain(java.lang.String trainType, int quantity, boolean testCase)
trainType
- - Train type with capitalquantity
- - Number of trains being boughttestCase
- - If it is a JUnit testpublic void repairStation(Station station, boolean testCase)
station
- - the station to be repairedtestCase
- - If this is a JUnit testpublic void upgradeStation(Station station, boolean testCase)
station
- - the station to be upgradedtestCase
- - if this is a JUnit testpublic 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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |