energyTycoon
Class ExchangeClient

java.lang.Object
  extended by energyTycoon.Exchange
      extended by energyTycoon.ExchangeClient

public class ExchangeClient
extends Exchange

Define exchange rules on client

Author:
Leo CARNAUT-DELORD

Constructor Summary
ExchangeClient(ClientGame game, NetworkDistantPlayer provider)
           
ExchangeClient(int sellPrice, int sellMax, int buyMaxPrice, int buyMax, NetworkDistantPlayer provider)
          client exchange constructor
 
Method Summary
 boolean changeValues(int sellPrice, int sellMax, int buyMaxPrice, int buyMax)
          change exchange properties
 NetworkDistantPlayer getProvider()
           
 
Methods inherited from class energyTycoon.Exchange
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

ExchangeClient

public ExchangeClient(int sellPrice,
                      int sellMax,
                      int buyMaxPrice,
                      int buyMax,
                      NetworkDistantPlayer provider)
client exchange constructor

Parameters:
sellPrice -
sellMax -
buyMaxPrice -
buyMax -

ExchangeClient

public ExchangeClient(ClientGame game,
                      NetworkDistantPlayer provider)
Parameters:
provider -
Method Detail

getProvider

public NetworkDistantPlayer getProvider()
Returns:

changeValues

public boolean changeValues(int sellPrice,
                            int sellMax,
                            int buyMaxPrice,
                            int buyMax)
change exchange properties

Overrides:
changeValues in class Exchange
Parameters:
sellPrice -
sellMax -
buyMaxPrice -
buyMax -
Returns:
true if there is some changes