net.vee.btech.saikoro
Class Game

java.lang.Object
  |
  +--net.vee.btech.saikoro.Game

public class Game
extends java.lang.Object

A Saikoro game, the data model which is presented to a user.


Constructor Summary
  Game(java.lang.String aName)
          Constructs a new Game.
protected Game(java.lang.String aName, int aRound)
          Constructs a new Game.
 
Method Summary
 void addGameListener(GameListener listener)
          Adds a GameListener to listen for GameEvents.
 boolean addUnit(Unit aUnit)
           
protected  boolean addUnitInternal(Unit aUnit)
           
 java.lang.String getName()
           
 int getRound()
           
 Unit getUnitAt(int aPos)
           
 int getUnitCount()
           
 int newRound()
           
 void removeGameListener(GameListener listener)
          Removes a GameListener.
 boolean removeUnit(Unit aUnit)
           
 void toXML(net.vee.io.xml.Generator aGenerator)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Game

public Game(java.lang.String aName)
Constructs a new Game.
Parameters:
aName - the name of the game.

Game

protected Game(java.lang.String aName,
               int aRound)
Constructs a new Game.
Parameters:
aName - the name of the game.
aRound - the game's initial round.
Method Detail

getName

public java.lang.String getName()

getUnitCount

public int getUnitCount()

getUnitAt

public Unit getUnitAt(int aPos)

addUnit

public boolean addUnit(Unit aUnit)

addUnitInternal

protected boolean addUnitInternal(Unit aUnit)

removeUnit

public boolean removeUnit(Unit aUnit)

getRound

public int getRound()

newRound

public int newRound()

addGameListener

public void addGameListener(GameListener listener)
Adds a GameListener to listen for GameEvents.

removeGameListener

public void removeGameListener(GameListener listener)
Removes a GameListener.

toXML

public void toXML(net.vee.io.xml.Generator aGenerator)
           throws net.vee.io.xml.XMLException