energyTycoon
Class Exchange
java.lang.Object
energyTycoon.Exchange
- Direct Known Subclasses:
- ExchangeClient, ExchangeServer
public abstract class Exchange
- extends java.lang.Object
define exchange rules between a player and an other
- Author:
- Leo CARNAUT-DELORD
Constructor Summary |
Exchange()
|
Exchange(int sellPrice,
int sellMax,
int buyMaxPrice,
int buyMax)
Exchange constructor |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Exchange
public Exchange(int sellPrice,
int sellMax,
int buyMaxPrice,
int buyMax)
- Exchange constructor
- Parameters:
sellPrice
- sellMax
- buyMaxPrice
- buyMax
-
Exchange
public Exchange()
setSellPrice
public void setSellPrice(int price)
setSellMax
public void setSellMax(int qt)
setBuyMaxPrice
public void setBuyMaxPrice(int price)
setBuyMax
public void setBuyMax(int qt)
getSellPrice
public int getSellPrice()
getSellMax
public int getSellMax()
getBuyMax
public int getBuyMax()
getBuyMaxPrice
public int getBuyMaxPrice()
changeValues
public boolean changeValues(int sellPrice,
int sellMax,
int buyMaxPrice,
int buyMax)
- change exchange properties
- Parameters:
sellPrice
- sellMax
- buyMaxPrice
- buyMax
-
- Returns:
- true if there is some changes