net.sf.freecol.common.model
Class GameOptions

java.lang.Object
  extended by net.sf.freecol.common.model.FreeColObject
      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 ALLOW_STUDENT_SELECTION
          Whether to educate the least skilled unit first.
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 EXPLORATION_POINTS
          Whether to award exploration points or not.
static java.lang.String FOG_OF_WAR
          Enables/disables fog of war.
static java.lang.String SAVE_PRODUCTION_OVERFLOW
           
static java.lang.String STARTING_MONEY
          The amount of money each player will receive before the game starts.
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
 
Fields inherited from class net.sf.freecol.common.model.FreeColObject
ID_ATTRIBUTE_TAG
 
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
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, getFile, getInteger, getObject, load, putOption, save, setFile, toXML
 
Methods inherited from class net.sf.freecol.common.option.OptionGroup
add, getName, getShortDescription, iterator, removeAll
 
Methods inherited from class net.sf.freecol.common.option.AbstractOption
getGroup, isPreviewEnabled, setGroup, setPreviewEnabled, toString
 
Methods inherited from class net.sf.freecol.common.model.FreeColObject
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAttribute, getAttribute, getAttribute, getAttribute, getId, getPropertyChangeListeners, getPropertyChangeListeners, hasAbility, hasAttribute, hasListeners, readFromXML, readFromXMLElement, removePropertyChangeListener, removePropertyChangeListener, toXML, toXML, toXMLElement, toXMLElement, toXMLElement, toXMLElement, toXMLElementPartial, writeAttribute, writeFreeColGameObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sf.freecol.common.option.Option
addPropertyChangeListener, getId, readFromXML, readFromXMLElement, removePropertyChangeListener, toXMLElement
 

Field Detail

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

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

SAVE_PRODUCTION_OVERFLOW

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

EXPLORATION_POINTS

public static final java.lang.String EXPLORATION_POINTS
Whether to award exploration points or not.

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

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

ALLOW_STUDENT_SELECTION

public static final java.lang.String ALLOW_STUDENT_SELECTION
Whether to educate the least skilled unit first. This is the behaviour of the original game and disallows manually assigning students to teachers.

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

getXMLElementTagName

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

Returns:
"gameOptions".