public class CityPlayerProxyJFX extends Object implements ch.sahits.game.openpatrician.client.ICityPlayerProxyJFX
| Modifier and Type | Field and Description |
|---|---|
private ch.sahits.game.openpatrician.model.ship.IShip |
activeShip
Reference the active ship of the player
|
private ch.sahits.game.openpatrician.model.city.ICity |
city |
private ch.sahits.game.openpatrician.model.IPlayer |
player |
private javafx.collections.ObservableList<ch.sahits.game.openpatrician.model.ship.IShip> |
playerShips
List holding all ships owned by the player currently present in the city
|
private javafx.collections.ObservableList<ch.sahits.game.openpatrician.model.ship.IShip> |
shipList
List holding all ships currently present in the city
|
| Constructor and Description |
|---|
CityPlayerProxyJFX(ch.sahits.game.openpatrician.model.city.ICity city,
ch.sahits.game.openpatrician.model.IPlayer player,
ch.sahits.game.openpatrician.model.ship.IShip activeShip)
/**
Constructor initializing the city and the player with one ship in port.
|
| Modifier and Type | Method and Description |
|---|---|
void |
activateShip(ch.sahits.game.openpatrician.model.ship.IShip ship)
Activate a ship.
|
void |
arrive(ch.sahits.game.openpatrician.model.ship.IShip ship)
A ship arrives in the city
|
ch.sahits.game.openpatrician.model.ship.IShip |
getActiveShip() |
ch.sahits.game.openpatrician.model.city.ICity |
getCity() |
ch.sahits.game.openpatrician.model.IPlayer |
getPlayer() |
javafx.collections.ObservableList<ch.sahits.game.openpatrician.model.ship.IShip> |
getPlayersShips() |
void |
leave(ch.sahits.game.openpatrician.model.ship.IShip ship)
Ship leave the city
|
private final ch.sahits.game.openpatrician.model.city.ICity city
private final ch.sahits.game.openpatrician.model.IPlayer player
private javafx.collections.ObservableList<ch.sahits.game.openpatrician.model.ship.IShip> shipList
private javafx.collections.ObservableList<ch.sahits.game.openpatrician.model.ship.IShip> playerShips
private ch.sahits.game.openpatrician.model.ship.IShip activeShip
public CityPlayerProxyJFX(ch.sahits.game.openpatrician.model.city.ICity city,
ch.sahits.game.openpatrician.model.IPlayer player,
ch.sahits.game.openpatrician.model.ship.IShip activeShip)
city - player - activeShip - public ch.sahits.game.openpatrician.model.ship.IShip getActiveShip()
getActiveShip in interface ch.sahits.game.openpatrician.client.ICityPlayerProxyJFXpublic void activateShip(ch.sahits.game.openpatrician.model.ship.IShip ship)
IllegalArgumentException will be thrownship - IllegalArgumentException - if the ship cannot be activated due to its non existencepublic javafx.collections.ObservableList<ch.sahits.game.openpatrician.model.ship.IShip> getPlayersShips()
getPlayersShips in interface ch.sahits.game.openpatrician.client.ICityPlayerProxyJFXpublic void arrive(ch.sahits.game.openpatrician.model.ship.IShip ship)
ship - public void leave(ch.sahits.game.openpatrician.model.ship.IShip ship)
ship - public ch.sahits.game.openpatrician.model.city.ICity getCity()
getCity in interface ch.sahits.game.openpatrician.client.ICityPlayerProxyJFXpublic ch.sahits.game.openpatrician.model.IPlayer getPlayer()
getPlayer in interface ch.sahits.game.openpatrician.client.ICityPlayerProxyJFXCopyright © 2011-2015 Sahits GmbH. All Rights Reserved.