net.sf.freecol.common.model
Class GameOptions

java.lang.Object
  extended by net.sf.freecol.common.option.AbstractOption
      extended by net.sf.freecol.common.option.OptionGroup
          extended by net.sf.freecol.common.option.OptionMap
              extended by net.sf.freecol.common.model.GameOptions
All Implemented Interfaces:
Option

public class GameOptions
extends OptionMap

Keeps track of the available game options. New options should be added to addDefaultOptions() and each option should be given an unique identifier (defined as a constant in this class).


Field Summary
static java.lang.String COPYRIGHT
           
static java.lang.String CUSTOM_IGNORE_BOYCOTT
          Does the Custom House sell boycotted goods
static java.lang.String DIFFICULTY
          The difficulty of the game.
static java.lang.String EXPERTS_HAVE_CONNECTIONS
          Whether experts have connections, producing without raw materials in factories
static java.lang.String FOG_OF_WAR
          Enables/disables fog of war.
static java.lang.String HAMMER_PRICE
          The cost of a single hammer when buying a building in a colony.
static java.lang.String LICENSE
           
static java.lang.String REVISION
           
static java.lang.String STARTING_MONEY
          The amount of money each player will receive before the game starts.
static java.lang.String UNIT_HIDING
          No units are hidden on carriers or settlements if this option is set to false.
static java.lang.String VICTORY_DEFEAT_EUROPEANS
          Victory condition: Should a Player who first defeats all other european players win the game?
static java.lang.String VICTORY_DEFEAT_HUMANS
          Victory condition: Should a Player who first defeats all other human players win the game?
static java.lang.String VICTORY_DEFEAT_REF
          Victory condition: Should the Player who first defeats the Royal Expeditionary Force win the game?
 
Fields inherited from class net.sf.freecol.common.option.AbstractOption
NO_ID
 
Constructor Summary
GameOptions()
          Creates a new GameOptions.
GameOptions(org.w3c.dom.Element e)
          Creates an GameOptions from an XML representation.
GameOptions(javax.xml.stream.XMLStreamReader in)
          Creates an GameOptions from an XML representation.
 
Method Summary
protected  void addDefaultOptions()
          Adds the options to this GameOptions.
static java.lang.String getXMLElementTagName()
          Gets the tag name of the root element representing this object.
 
Methods inherited from class net.sf.freecol.common.option.OptionMap
addToMap, getBoolean, getInteger, getObject, readFromXMLImpl, toXML
 
Methods inherited from class net.sf.freecol.common.option.OptionGroup
add, iterator, removeAll, toXMLImpl
 
Methods inherited from class net.sf.freecol.common.option.AbstractOption
addPropertyChangeListener, firePropertyChange, getId, getName, getShortDescription, readFromXML, readFromXMLElement, removePropertyChangeListener, toString, toXMLElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
See Also:
Constant Field Values

LICENSE

public static final java.lang.String LICENSE
See Also:
Constant Field Values

REVISION

public static final java.lang.String REVISION
See Also:
Constant Field Values

STARTING_MONEY

public static final java.lang.String STARTING_MONEY
The amount of money each player will receive before the game starts.

See Also:
Constant Field Values

HAMMER_PRICE

public static final java.lang.String HAMMER_PRICE
The cost of a single hammer when buying a building in a colony.

See Also:
Constant Field Values

CUSTOM_IGNORE_BOYCOTT

public static final java.lang.String CUSTOM_IGNORE_BOYCOTT
Does the Custom House sell boycotted goods

See Also:
Constant Field Values

EXPERTS_HAVE_CONNECTIONS

public static final java.lang.String EXPERTS_HAVE_CONNECTIONS
Whether experts have connections, producing without raw materials in factories

See Also:
Constant Field Values

FOG_OF_WAR

public static final java.lang.String FOG_OF_WAR
Enables/disables fog of war.

See Also:
Constant Field Values

UNIT_HIDING

public static final java.lang.String UNIT_HIDING
No units are hidden on carriers or settlements if this option is set to false.

See Also:
Constant Field Values

VICTORY_DEFEAT_REF

public static final java.lang.String VICTORY_DEFEAT_REF
Victory condition: Should the Player who first defeats the Royal Expeditionary Force win the game?

See Also:
Constant Field Values

VICTORY_DEFEAT_EUROPEANS

public static final java.lang.String VICTORY_DEFEAT_EUROPEANS
Victory condition: Should a Player who first defeats all other european players win the game?

See Also:
Constant Field Values

VICTORY_DEFEAT_HUMANS

public static final java.lang.String VICTORY_DEFEAT_HUMANS
Victory condition: Should a Player who first defeats all other human players win the game?

See Also:
Constant Field Values

DIFFICULTY

public static final java.lang.String DIFFICULTY
The difficulty of the game.

See Also:
Constant Field Values
Constructor Detail

GameOptions

public GameOptions()
Creates a new GameOptions.


GameOptions

public GameOptions(javax.xml.stream.XMLStreamReader in)
            throws javax.xml.stream.XMLStreamException
Creates an GameOptions from an XML representation.

Parameters:
in - The input stream containing the XML.
Throws:
javax.xml.stream.XMLStreamException - if an error occured during parsing.

GameOptions

public GameOptions(org.w3c.dom.Element e)
Creates an GameOptions from an XML representation.

Parameters:
e - An XML-element that will be used to initialize this object.
Method Detail

addDefaultOptions

protected void addDefaultOptions()
Adds the options to this GameOptions.

Specified by:
addDefaultOptions in class OptionMap

getXMLElementTagName

public static java.lang.String getXMLElementTagName()
Gets the tag name of the root element representing this object.

Returns:
"gameOptions".