energyTycoon.gui.game
Interface GameListener

All Known Implementing Classes:
ClientManagement

public interface GameListener

Author:
Léo CARNAUT-DELORD

Method Summary
 void addBatteryCapacityBattery()
           
 void buildPowerStation(PowerStationGroup psg, int generation)
          build a power station
 void changeBudget(int newBudget, int knowingBudget)
          change research budget
 void changePowerStationProduction(int powerStationId, int production)
           
 void changePriceInCity(int cityId, int price)
          the player change his price
 void destroyPowerStation(int id)
           
 java.util.List<PowerStationType> getAllAvailablePowerStationType(int groupId)
           
 java.util.Vector<Customer> getAllCustomers()
          get all customers
 java.util.List<PowerStationGroup> getAllGroupsAvailable()
          get all groups that player can build
 java.util.List<PowerStation> getAllStations()
          get all player stations
 ClientGame getGame()
          get the game
 int getGroupMaxGenerationAvailable(int powerStationGroupId)
           
 PhysicPlayer getPlayer()
          get the user player
 void quitGame()
          exit game
 void restoreBattery()
           
 void restorePowerStation(int id)
           
 void sendChatMessage(java.lang.String message)
          Send a chat message to other players
 void setInCity(int cityId, int price)
          the player want to set in a city
 void upgradePowerStation(int id)
           
 

Method Detail

quitGame

void quitGame()
exit game


sendChatMessage

void sendChatMessage(java.lang.String message)
Send a chat message to other players

Parameters:
message - message the user send

getAllStations

java.util.List<PowerStation> getAllStations()
get all player stations

Returns:
power station list

getAllAvailablePowerStationType

java.util.List<PowerStationType> getAllAvailablePowerStationType(int groupId)
Returns:

getAllGroupsAvailable

java.util.List<PowerStationGroup> getAllGroupsAvailable()
get all groups that player can build

Returns:

getAllCustomers

java.util.Vector<Customer> getAllCustomers()
get all customers

Returns:

buildPowerStation

void buildPowerStation(PowerStationGroup psg,
                       int generation)
build a power station

Parameters:
psg - group
generation - power generation

getGame

ClientGame getGame()
get the game

Returns:

setInCity

void setInCity(int cityId,
               int price)
the player want to set in a city

Parameters:
cityId - the city Id where we want to set
price - energy price for this city

changePriceInCity

void changePriceInCity(int cityId,
                       int price)
the player change his price

Parameters:
cityId - the city Id where we want to change price
price - energy price for this city

changeBudget

void changeBudget(int newBudget,
                  int knowingBudget)
change research budget

Parameters:
newBudget -
knowingBudget -

getPlayer

PhysicPlayer getPlayer()
get the user player


restoreBattery

void restoreBattery()

addBatteryCapacityBattery

void addBatteryCapacityBattery()

changePowerStationProduction

void changePowerStationProduction(int powerStationId,
                                  int production)

restorePowerStation

void restorePowerStation(int id)
Parameters:
id -

getGroupMaxGenerationAvailable

int getGroupMaxGenerationAvailable(int powerStationGroupId)

upgradePowerStation

void upgradePowerStation(int id)

destroyPowerStation

void destroyPowerStation(int id)