|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.freecol.client.control.ClientModelController
public class ClientModelController
A client-side implementation of the ModelController interface.
| Field Summary | |
|---|---|
static java.lang.String |
COPYRIGHT
|
static java.lang.String |
LICENSE
|
static java.lang.String |
REVISION
|
| Constructor Summary | |
|---|---|
ClientModelController(FreeColClient freeColClient)
Creates a new ClientModelController. |
|
| Method Summary | |
|---|---|
Unit |
createUnit(java.lang.String taskID,
Location location,
Player owner,
int type)
Creates a new unit. |
void |
exploreTiles(Player player,
java.util.ArrayList<Tile> tiles)
Explores the given tiles for the given player. |
TradeRoute |
getNewTradeRoute(Player player)
Returns a new TradeRoute object. |
PseudoRandom |
getPseudoRandom()
Get the pseudo-random number generator provided by the client. |
int |
getRandom(java.lang.String taskID,
int n)
Returns a pseudorandom int, uniformly distributed between 0 (inclusive) and the specified value (exclusive). |
void |
setStance(Player first,
Player second,
int stance)
Updates stances. |
Location |
setToVacantEntryLocation(Unit unit)
Puts the specified Unit in America. |
boolean |
shouldCallNewTurn(FreeColGameObject freeColGameObject)
Check if game object should receive newTurn call. |
void |
update(Tile tile)
Tells the ModelController that an internal change (that
is; not caused by the control) has occured in the model. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String COPYRIGHT
public static final java.lang.String LICENSE
public static final java.lang.String REVISION
| Constructor Detail |
|---|
public ClientModelController(FreeColClient freeColClient)
ClientModelController.
freeColClient - The main controller.| Method Detail |
|---|
public int getRandom(java.lang.String taskID,
int n)
getRandom in interface ModelControllertaskID - The taskID should be a unique identifier.
One method to make a unique taskID: n - The specified value.
public Unit createUnit(java.lang.String taskID,
Location location,
Player owner,
int type)
createUnit in interface ModelControllertaskID - The taskID should be a unique identifier.
One method to make a unique taskID: location - The Location where the Unit
will be created.owner - The Player owning the Unit.type - The type of unit (Unit.FREE_COLONIST...).
Unit.public Location setToVacantEntryLocation(Unit unit)
Unit in America.
setToVacantEntryLocation in interface ModelControllerunit - The Unit.
Location where the Unit
appears.
public void setStance(Player first,
Player second,
int stance)
setStance in interface ModelControllerfirst - The first Player.second - The second Player.stance - The new stance.
public void exploreTiles(Player player,
java.util.ArrayList<Tile> tiles)
exploreTiles in interface ModelControllerplayer - The Player that should see more tiles.tiles - The tiles to explore.public void update(Tile tile)
ModelController that an internal change (that
is; not caused by the control) has occured in the model.
tile - The Tile which will need an update.public PseudoRandom getPseudoRandom()
getPseudoRandom in interface ModelControllerpublic TradeRoute getNewTradeRoute(Player player)
TradeRoute object.
getNewTradeRoute in interface ModelControllerTradeRoute object.public boolean shouldCallNewTurn(FreeColGameObject freeColGameObject)
shouldCallNewTurn in interface ModelControllerfreeColGameObject - The game object.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||