net.sf.colossus.client
Class PlayerClientSide

java.lang.Object
  extended by net.sf.colossus.game.Player
      extended by 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
private  PredictSplits predictSplits
           
 
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).
 
Method Summary
 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 items
 PredictSplits 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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 through update(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 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