org.vizzini.game
Interface IGame

All Known Subinterfaces:
IBoardGame
All Known Implementing Classes:
AbstractBoardGame, AbstractGame, DefaultGame

public interface IGame

Defines methods required by games in the game framework. A game instance assembles the appropriate pieces to create a full game. These pieces consist of an engine, an environment, and an adjudicator.

Since:
v0.1
Version:
v0.3
Author:
Jeffrey M. Thompson

Method Summary
 void configure()
          Configure this environment.
 void configure(Properties properties)
          Configure this environment.
 IAdjudicator getAdjudicator()
          Return the adjudicator.
 IEngine getEngine()
          Return the engine.
 IEnvironment getEnvironment()
          Return the environment.
 String getGameIdentifier()
          Return the game identifier.
 IGameState getGameState()
          Return the game state.
 Properties getProperties()
          Return the configuration properties.
 String getPropertiesPath()
          Return the path to the game properties.
 void open(File file)
          Open the game contained in the given file.
 void reset()
          Reset to the initial state.
 void save()
          Save the current game.
 void saveAs(File file)
          Save the current game to the given file.
 void setPropertiesPath(String propertiesPath)
          Set the path to the game properties.
 void start()
          Start the game.
 void stop()
          Stop the game.
 

Method Detail

configure

void configure()
               throws InstantiationException,
                      IllegalAccessException
Configure this environment.

Throws:
InstantiationException
IllegalAccessException
Since:
v0.1

configure

void configure(Properties properties)
               throws InstantiationException,
                      IllegalAccessException
Configure this environment.

Parameters:
properties - Source of configuration information.
Throws:
InstantiationException
IllegalAccessException
Since:
v0.1

getAdjudicator

IAdjudicator getAdjudicator()
Return the adjudicator.

Since:
v0.1

getEngine

IEngine getEngine()
Return the engine.

Since:
v0.1

getEnvironment

IEnvironment getEnvironment()
Return the environment.

Since:
v0.1

getGameIdentifier

String getGameIdentifier()
Return the game identifier.

Since:
v0.1

getGameState

IGameState getGameState()
Return the game state.

Since:
v0.1

getProperties

Properties getProperties()
Return the configuration properties.

Since:
v0.3

getPropertiesPath

String getPropertiesPath()
Return the path to the game properties.

Since:
v0.1

open

void open(File file)
          throws FileNotFoundException,
                 IOException,
                 ClassNotFoundException
Open the game contained in the given file.

Throws:
FileNotFoundException
IOException
ClassNotFoundException
Since:
v0.1

reset

void reset()
Reset to the initial state.

Since:
v0.1

save

void save()
          throws FileNotFoundException,
                 IOException
Save the current game.

Throws:
FileNotFoundException
IOException
Since:
v0.1

saveAs

void saveAs(File file)
            throws FileNotFoundException,
                   IOException
Save the current game to the given file.

Throws:
FileNotFoundException
IOException
Since:
v0.1

setPropertiesPath

void setPropertiesPath(String propertiesPath)
Set the path to the game properties.

Since:
v0.1

start

void start()
Start the game.

Since:
v0.1

stop

void stop()
Stop the game.

Since:
v0.1


Copyright © 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02