|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.TeamHEC.LocomotionCommotion.Map.MapObj
com.TeamHEC.LocomotionCommotion.Map.Station
public class Station
Field Summary | |
---|---|
double |
mindistance
|
Fields inherited from class com.TeamHEC.LocomotionCommotion.Map.MapObj |
---|
actor, connections, x, y |
Constructor Summary | |
---|---|
Station(java.lang.String name,
int baseValue,
Resource resourceType,
int baseFuelOut,
Line[] line,
int rentValue,
float x,
float y)
|
Method Summary | |
---|---|
void |
addRentValueMod(int add)
Add to the rent value modifier |
void |
addResourceOutMod(int add)
Adds to the value of the resource out mod |
void |
addValueMod(int add)
Adds to the value mod |
void |
fixFault()
fixes the fault on a station |
int |
getBaseRentValue()
|
int |
getBaseResourceOut()
|
int |
getBaseValue()
|
double |
getFaultRate()
Gets the fault rate of a station |
Line[] |
getLineType()
|
java.lang.String |
getName()
Returns the name of the station or junction the MapObj represents |
Player |
getOwner()
|
int |
getRentValueMod()
|
boolean |
getRepairable()
|
int |
getResourceOutMod()
|
java.lang.String |
getResourceString()
|
Resource |
getResourceType()
|
Station |
getStation()
|
Game_Map_Station |
getStationActor()
Gets the station Actor |
int |
getStationLevel()
gets the stations upgrade level |
int |
getTotalRent()
|
int |
getTotalResourceOut()
|
int |
getTotalValue()
|
int |
getValueMod()
|
boolean |
isFaulty()
|
void |
makeFaulty()
makes a station faulty |
void |
notifyStationPurchased(Station station,
Player player)
Called when you want to notify listeners that a station has changed ownership, such as changing the texture on the map or setting the text of the players gold |
void |
register(StationListener newListener)
Registers an object implementing the StationListener by adding it to the listeners array |
void |
setOwner(Player newOwner)
Changes the owner of this station and notifies listeners |
void |
setRentValueMod(int value)
Sets the rent value modifier |
void |
setResourceOutMod(int mod)
|
void |
setValueMod(int value)
Sets the value mod |
void |
subRentValueMod(int sub)
Subtracts from the rent value modifier |
void |
subResourceOutMod(int sub)
Subtracts from the resources out mod |
void |
subValueMod(int sub)
Subtracts from the value mod |
void |
unregister(StationListener s)
Removes object implementing StationListener so it no longer receives updates |
void |
upgradeStation()
Upgrades a stations reliability |
Methods inherited from class com.TeamHEC.LocomotionCommotion.Map.MapObj |
---|
getActor |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public double mindistance
Constructor Detail |
---|
public Station(java.lang.String name, int baseValue, Resource resourceType, int baseFuelOut, Line[] line, int rentValue, float x, float y)
name
- baseValue
- The value of the stationresourceType
- The type of resource the station producesbaseFuelOut
- The amount of resource the station produces each turn, without up line bonusesline
- Array of lines the station belongs torentValue
- How much it costs to rentx
- Coordinate of position x on mapy
- Coordinate of position y on mapMethod Detail |
---|
public Station getStation()
getStation
in class MapObj
public Game_Map_Station getStationActor()
public java.lang.String getName()
MapObj
getName
in class MapObj
public java.lang.String getResourceString()
public int getBaseValue()
public int getValueMod()
public void setValueMod(int value)
value
- public void addValueMod(int add)
add
- public void subValueMod(int sub)
sub
- public int getTotalValue()
public Resource getResourceType()
public int getBaseResourceOut()
public int getResourceOutMod()
public void setResourceOutMod(int mod)
mod
- the amount resourceOut will be increased by, Total = Base + Modpublic void addResourceOutMod(int add)
add
- public void subResourceOutMod(int sub)
sub
- public int getTotalResourceOut()
public int getBaseRentValue()
public int getRentValueMod()
public void setRentValueMod(int value)
value
- public void addRentValueMod(int add)
add
- public void subRentValueMod(int sub)
sub
- public int getTotalRent()
public Player getOwner()
public void setOwner(Player newOwner)
newOwner
- public Line[] getLineType()
public void register(StationListener newListener)
newListener
- the object to be addedpublic void unregister(StationListener s)
s
- the object to be removedpublic void notifyStationPurchased(Station station, Player player)
station
- player
- public boolean isFaulty()
public boolean getRepairable()
public void fixFault()
public void makeFaulty()
public void upgradeStation()
public int getStationLevel()
public double getFaultRate()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |