org.jogre.common
Class GameList

java.lang.Object
  extended byorg.jogre.common.GameList

public class GameList
extends Object

A GameList contains a number of Game objects.

Version:
Alpha 0.2.1
Author:
Bob Marks

Field Summary
protected  HashMap gamelist
          HashMap containing a number of Game objects.
 
Constructor Summary
GameList()
          Constructor to a game list.
 
Method Summary
 void addGame(Game game)
          Add a game to the game list.
 Game getGame(String gameKey)
          Return a Game object from a game key.
 Vector getGameKeys()
          Return the game keys.
 int size()
          Return the number of games currently loaded up.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gamelist

protected HashMap gamelist
HashMap containing a number of Game objects. They key is a game title and version seperated with a dash.

Constructor Detail

GameList

public GameList()
Constructor to a game list.

Method Detail

addGame

public void addGame(Game game)
Add a game to the game list. This should be done when the server is created for the first time.

Parameters:
game - Specified game.

getGame

public Game getGame(String gameKey)
Return a Game object from a game key.

Parameters:
gameKey - game title and version seperated with a dash -. e.g. chess-0.1
Returns:
Game Object stored in cache.

getGameKeys

public Vector getGameKeys()
Return the game keys.

Returns:

size

public int size()
Return the number of games currently loaded up.

Returns: