com.fuckingbrit.q3astats
Class Game

java.lang.Object
  |
  +--com.fuckingbrit.q3astats.Game

public class Game
extends java.lang.Object

The Game Class encapsulates a definition of a Quake 3 Arena Mod. A Game will read in an XML game definition file and provide structured access to the hits and weapons that define the game.

Version:
1.0
Author:
Michael Jervis (mike@fuckingbrit.com)

Field Summary
 boolean haveHits
          This value will contain true, if the XML contained a hit definition line.
 java.lang.String hitClass
          This contains the fully qualified class name for the mod specific hit parser
 java.lang.String hits
          The definition of the regular expression for a hit line (if the game has hit logging)
 java.util.Hashtable weaponDefinitions
          Definitions of the weapons that make up this game.
 
Constructor Summary
Game(java.io.InputStream xmlFile)
          This is the prefered constructor, loading from an XML InputStream, for example, sourced from a JAR file.
Game(java.lang.String xmlFile)
          Creates a game from an XML file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

weaponDefinitions

public java.util.Hashtable weaponDefinitions
Definitions of the weapons that make up this game.


hits

public java.lang.String hits
The definition of the regular expression for a hit line (if the game has hit logging)


haveHits

public boolean haveHits
This value will contain true, if the XML contained a hit definition line.


hitClass

public java.lang.String hitClass
This contains the fully qualified class name for the mod specific hit parser

Constructor Detail

Game

public Game(java.lang.String xmlFile)
     throws QuakeParseException
Creates a game from an XML file.

This is a basic version of the constructor. It's provided for creating new mod-specific parsers for the development stage when your mod code is not in a Jar.

Parameters:
xmlFile - The path to an XML game definition
Throws:
QuakeParseException - Thrown if the file is not extant, readable and valid.

Game

public Game(java.io.InputStream xmlFile)
     throws QuakeParseException
This is the prefered constructor, loading from an XML InputStream, for example, sourced from a JAR file.

Parameters:
xmlFile - A ready-to-go input stream pointing at valid XML
Throws:
QuakeParseException - thrown if the XML is not valid.