net.sf.colossus.client
Class PlayerClientSide
java.lang.Object
net.sf.colossus.game.Player
net.sf.colossus.client.PlayerClientSide
public final class PlayerClientSide
- extends Player
This class holds client-side version of a player.
- Author:
- David Ripton
Constructor Summary |
PlayerClientSide(Game game,
java.lang.String playerName,
int number)
Two-stage initialization at the moment, only some data here, the rest comes
through update(String) . |
Methods inherited from class net.sf.colossus.game.Player |
addLegion, addMarkerAvailable, addPlayerElim, canTitanTeleport, clearMarkersAvailable, getColor, getDeadBeforeSave, getFirstAvailableMarker, getGame, getMarkersAvailable, getMulligansLeft, getName, getNumber, getNumCreatures, getNumLegions, getNumMarkersAvailable, getPlayersElim, getScore, getShortColor, getStartingTower, getTitanBasename, getTitanLegion, getTitanPower, getTotalPointValue, getType, hasLegion, hasMoved, hasTeleported, isAI, isDead, isHuman, isLocalHuman, isMarkerAvailable, isNetwork, isNone, removeAllLegions, removeLegion, removeMarkerAvailable, selectMarkerId, setColor, setDead, setDeadBeforeSave, setMulligansLeft, setName, setPlayersElim, setScore, setStartingTower, setType, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
predictSplits
private PredictSplits predictSplits
PlayerClientSide
PlayerClientSide(Game game,
java.lang.String playerName,
int number)
- Two-stage initialization at the moment, only some data here, the rest comes
through
update(String)
.
TODO: the object should be properly initialized in the constructor
getLegions
public java.util.List<LegionClientSide> getLegions()
- Description copied from class:
Player
- TODO should be List, but currently subclasses still use more specific types
TODO should be unmodifiable, but at least
PlayerServerSide.die(Player)
still
removes items
- Overrides:
getLegions
in class Player
update
void update(java.lang.String infoString)
- Takes a colon-separated string of form
dead:name:tower:color:elim:legions:markers:creatures:value:titan:score
TODO this is part of the network protocol and should be somewhere in there
getPredictSplits
public PredictSplits getPredictSplits()
initPredictSplits
public void initPredictSplits(Legion rootLegion,
java.util.List<CreatureType> creatures)
getLegionByMarkerId
public LegionClientSide getLegionByMarkerId(java.lang.String markerId)
- Overrides:
getLegionByMarkerId
in class Player