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 Details

  • Constructor Details

    • PlayerClientSide

      PlayerClientSide(Game game, 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 Details

    • getLegions

      public 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(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, List<CreatureType> creatures)
    • getLegionByMarkerId

      public LegionClientSide getLegionByMarkerId(String markerId)
      Overrides:
      getLegionByMarkerId in class Player