org.gjt.universe
Class PlayerBase

java.lang.Object
  |
  +--org.gjt.universe.DBItem
        |
        +--org.gjt.universe.PlayerBase
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
PlayerComputer, PlayerHuman, PlayerUndefined

public abstract class PlayerBase
extends DBItem

See Also:
Serialized Form

Field Summary
private  CivID civID
           
private static PlayerID currentID
           
private  PlayerID ID
           
private  java.lang.String name
           
private  UniverseScriptObject scriptObject
          This is the tcl script interpreter.
private  PlayerThread thread
           
private  boolean threadstarted
           
 
Constructor Summary
protected PlayerBase(boolean undefined)
          This constructor is only for the PlayerUndefined object.
protected PlayerBase(CivID aCivID)
          Standard base constructor that initializes the object.
 
Method Summary
 void addScript(java.lang.String str)
          This loads a script into the script object
 Civ getCiv()
          This method returns the civilization which the player is directing.
 PlayerID getID()
           
 Index getIndex()
          See getID() in the subclasses for a typed version.
 java.lang.String getName()
           
 CivID getOwner()
          This method returns the civilization which is being directed by the player.
 PlayerThread getThread()
           
(package private) abstract  void initializeThreads()
           
 void instantiateScriptObject()
          This creates the tcl script object
(package private)  void setName(java.lang.String name)
           
(package private)  void setThread(PlayerThread thread)
           
(package private)  void start()
           
abstract  void Submit()
           
 
Methods inherited from class org.gjt.universe.DBItem
getLocation, specificDisplayDebug
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentID

private static PlayerID currentID

ID

private PlayerID ID

name

private java.lang.String name

civID

private CivID civID

thread

private transient PlayerThread thread

scriptObject

private UniverseScriptObject scriptObject
This is the tcl script interpreter.


threadstarted

private transient boolean threadstarted
Constructor Detail

PlayerBase

protected PlayerBase(CivID aCivID)
Standard base constructor that initializes the object.


PlayerBase

protected PlayerBase(boolean undefined)
This constructor is only for the PlayerUndefined object.

Method Detail

instantiateScriptObject

public void instantiateScriptObject()
This creates the tcl script object


addScript

public void addScript(java.lang.String str)
This loads a script into the script object


getID

public PlayerID getID()

getIndex

public Index getIndex()
Description copied from class: DBItem
See getID() in the subclasses for a typed version.

Specified by:
getIndex in class DBItem

getOwner

public CivID getOwner()
This method returns the civilization which is being directed by the player.

Overrides:
getOwner in class DBItem

getCiv

public Civ getCiv()
This method returns the civilization which the player is directing.


Submit

public abstract void Submit()

getName

public java.lang.String getName()
Specified by:
getName in class DBItem

setName

void setName(java.lang.String name)

setThread

void setThread(PlayerThread thread)

getThread

public PlayerThread getThread()

start

void start()

initializeThreads

abstract void initializeThreads()


Copyright © 2001 Universe Dev Team All Rights Reserved.