|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectenergyTycoon.Exchange
energyTycoon.ExchangeServer
public class ExchangeServer
Exchange rules between two players
Constructor Summary | |
---|---|
ExchangeServer(NetworkServerPlayer owner,
NetworkServerPlayer proCustomer)
|
Method Summary | |
---|---|
void |
buy(int quantity)
buy energy |
boolean |
canBuy()
test if the player can buy to this customer |
boolean |
canSell()
test if the player can sell to this customer |
int |
getBuyPrice()
get the price the player will pay energy |
NetworkServerPlayer |
getProCustomer()
get pro customer ( other provider ) |
int |
maxAvailableToBuy()
get the maximum energy available to buy |
int |
maxAvailableToSell()
get the maximum energy available to sell |
void |
reset()
reset sell frame counter |
void |
sell(int quantity)
sell energy |
void |
setMirror(ExchangeServer mirror)
|
Methods inherited from class energyTycoon.Exchange |
---|
changeValues, getBuyMax, getBuyMaxPrice, getSellMax, getSellPrice, setBuyMax, setBuyMaxPrice, setSellMax, setSellPrice |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExchangeServer(NetworkServerPlayer owner, NetworkServerPlayer proCustomer)
owner
- proCustomer
- Method Detail |
---|
public void setMirror(ExchangeServer mirror)
mirror
- public NetworkServerPlayer getProCustomer()
public int getBuyPrice()
public void reset()
public boolean canSell()
public boolean canBuy()
public int maxAvailableToBuy()
public int maxAvailableToSell()
public void buy(int quantity)
quantity
- quantity to buypublic void sell(int quantity)
quantity
- quantity to sell
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |