energyTycoon
Class Exchange

java.lang.Object
  extended by 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
 
Method Summary
 boolean changeValues(int sellPrice, int sellMax, int buyMaxPrice, int buyMax)
          change exchange properties
 int getBuyMax()
           
 int getBuyMaxPrice()
           
 int getSellMax()
           
 int getSellPrice()
           
 void setBuyMax(int qt)
           
 void setBuyMaxPrice(int price)
           
 void setSellMax(int qt)
           
 void setSellPrice(int price)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Exchange

public Exchange(int sellPrice,
                int sellMax,
                int buyMaxPrice,
                int buyMax)
Exchange constructor

Parameters:
sellPrice -
sellMax -
buyMaxPrice -
buyMax -

Exchange

public Exchange()
Method Detail

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