jtge.engine.data
Class AbstractContext

java.lang.Object
  extended byjtge.engine.data.AbstractContext
All Implemented Interfaces:
IContext

public abstract class AbstractContext
extends java.lang.Object
implements IContext

Captures common context behaviours.

FIXME refactor with battlehex turn management.

Version:
$Revision: 1.3 $ $Date: 2005/08/26 18:09:35 $
Author:
Mathieu Champlon

Constructor Summary
AbstractContext(java.lang.String name)
          Create a context.
 
Method Summary
 java.lang.String getName()
          Get the context name.
 int getTurn()
          Get the current turn.
 void nextTurn()
          Increments the current turn.
protected abstract  void turnEnded()
          Turn end event.
protected abstract  void turnStarted()
          Turn start event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jtge.engine.data.IContext
get, put, register
 

Constructor Detail

AbstractContext

public AbstractContext(java.lang.String name)
Create a context.

Parameters:
name - the game name.
Method Detail

getName

public final java.lang.String getName()
Get the context name.

Returns:
the context name

getTurn

public final int getTurn()
Get the current turn.

Returns:
the context turn

nextTurn

public final void nextTurn()
Increments the current turn.


turnStarted

protected abstract void turnStarted()
Turn start event.


turnEnded

protected abstract void turnEnded()
Turn end event.



Copyright © 2003-2005 . All Rights Reserved.