Package 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
-
-
Field Summary
Fields Modifier and Type Field Description private PredictSplits
predictSplits
-
Constructor Summary
Constructors Constructor Description PlayerClientSide(Game game, java.lang.String playerName, int number)
Two-stage initialization at the moment, only some data here, the rest comes throughupdate(String)
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LegionClientSide
getLegionByMarkerId(java.lang.String markerId)
java.util.List<LegionClientSide>
getLegions()
TODO should be List, but currently subclasses still use more specific types TODO should be unmodifiable, but at least PlayerServerSide.die(Player)
still removes itemsPredictSplits
getPredictSplits()
void
initPredictSplits(Legion rootLegion, java.util.List<CreatureType> creatures)
(package private) 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-
Methods inherited from class net.sf.colossus.game.Player
addLegion, addMarkerAvailable, addPlayerElim, canTitanTeleport, clearMarkersAvailable, getAngelBasename, 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
-
-
-
-
Field Detail
-
predictSplits
private PredictSplits predictSplits
-
-
Constructor Detail
-
PlayerClientSide
PlayerClientSide(Game game, java.lang.String playerName, int number)
Two-stage initialization at the moment, only some data here, the rest comes throughupdate(String)
. TODO: the object should be properly initialized in the constructor
-
-
Method Detail
-
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 classPlayer
-
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 classPlayer
-
-