dd.hurricane
Class Scenario

java.lang.Object
  extended bydd.sim.SimObject
      extended bydd.hurricane.Scenario
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Tutorial

public class Scenario
extends SimObject

The scenario object handles all the setup associated with starting a turn. It has a publicly-accessible ArrayList named "proposals" that holds the list of proposals for the current turn. ... [more to come]

Author:
Seth McGinnis
See Also:
Serialized Form

Field Summary
 
Fields inherited from class dd.sim.SimObject
attributes
 
Constructor Summary
Scenario()
           
 
Method Summary
 float getBaseEconBudget()
          Gets the base economic budget for this turn.
 float getBaseSocialBudget()
          Gets the base social budget for this turn.
 float getCurrentEconBudget()
          Gets the current economic budget for this turn.
 float getCurrentSocialBudget()
          Gets the current social budget for this turn.
 Briefing getDebriefing()
           
 java.lang.String getIntro()
           
 Map getMap()
           
 java.lang.String getName()
           
 int getNumTurns()
           
 int getTurn()
           
 void loadMap(java.lang.String fileName)
           
static void main(java.lang.String[] args)
           
 Briefing nextTurn(GameRoot root, java.util.Random rng)
           
static CostTable readCostTable()
           
static Proposal readProposal(java.lang.String filename)
           
 java.lang.String roleForPlayer(int turnNumber)
           
 void setBudget(float econ, float social)
          Set the budget for this turn.
 void setCurrentEconBudget(int budget)
           
 void setCurrentSocialBudget(int budget)
           
 void setMap(Map map)
           
 void spendBudget(float econCost, float socialCost)
          Spends from the current budget.
 
Methods inherited from class dd.sim.SimObject
addPropertyChangeListener, addPropertyChangeListener, debug, duplicate, error, fatal, filter, filter, firePropertyChange, getAttribute, getAttribute, getAttributes, getGlobalAttribute, getObjectAttribute, getObjectAttribute, incrementAttribute, incrementAttribute, isSet, log, out, readFromXML, readFromXML, removeAttribute, removePropertyChangeListener, setAttribute, setAttribute, setAttribute, setAttributes, setGlobalAttribute, warning, writeText, writeXML, writeXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Scenario

public Scenario()
Method Detail

loadMap

public void loadMap(java.lang.String fileName)

getIntro

public java.lang.String getIntro()

nextTurn

public Briefing nextTurn(GameRoot root,
                         java.util.Random rng)

getDebriefing

public Briefing getDebriefing()

getTurn

public int getTurn()

getNumTurns

public int getNumTurns()

getName

public java.lang.String getName()

roleForPlayer

public java.lang.String roleForPlayer(int turnNumber)

getBaseEconBudget

public float getBaseEconBudget()
Gets the base economic budget for this turn.


getBaseSocialBudget

public float getBaseSocialBudget()
Gets the base social budget for this turn.


getCurrentEconBudget

public float getCurrentEconBudget()
Gets the current economic budget for this turn.


setCurrentEconBudget

public void setCurrentEconBudget(int budget)

getCurrentSocialBudget

public float getCurrentSocialBudget()
Gets the current social budget for this turn.


setCurrentSocialBudget

public void setCurrentSocialBudget(int budget)

setBudget

public void setBudget(float econ,
                      float social)
Set the budget for this turn. Sets both base and current values. Incorporates bonuses and remainders from the previous turn.


spendBudget

public void spendBudget(float econCost,
                        float socialCost)
Spends from the current budget. Adds the minus sign, so spendBudget(3,5) will subtract 3 from the current economic budget and 5 from the current social budget. Base budgets are never affected by spending.


getMap

public Map getMap()

setMap

public void setMap(Map map)

readProposal

public static Proposal readProposal(java.lang.String filename)

readCostTable

public static CostTable readCostTable()

main

public static void main(java.lang.String[] args)