Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.huguesjohnson.tiamat.demos.Camineet
Class CDGameState

    java.lang.Object
      com.huguesjohnson.tiamat.demos.Camineet.BaseGameState
          com.huguesjohnson.tiamat.demos.Camineet.CDGameState

All Implemented Interfaces:
  Storable

public class CDGameState
extends BaseGameState

CDGameState - extension of BaseGameState with attributes specific to this demo

Author:
  Hugues Johnson

Field Summary
`static int` | `TIME_DAY` constant for daytime
`static int` | `TIME_NIGHT` constant for nighttime

Constructor Summary
`CDGameState()` Create an empty CDGameState.
`CDGameState(Area currentArea)` Create a BaseGameState with an Area but no conditions.
`CDGameState(Area currentArea, int timeOfDay)` Create a BaseGameState with an Area but no conditions.
`CDGameState(Area currentArea, java.lang.String[] conditions)` Create a BaseGameState with conditions and an Area.
`CDGameState(Area currentArea, java.lang.String[] conditions, int timeOfDay)` Create a BaseGameState with conditions and an Area.
`CDGameState(int timeOfDay)` Create an empty CDGameState.
`CDGameState(java.lang.String[] conditions)` Create a CDGameState with conditions but no Area.
`CDGameState(java.lang.String[] conditions, int timeOfDay)` Create a CDGameState with conditions but no Area.

Method Summary
`java.lang.String` | `getCurrentAreaName()` Returns the name of the current area.
`int` | `getTimeOfDay()` Returns one of the time constants representing what time of day it is.
`void` | `setCurrentAreaName(java.lang.String areaName)` Sets the name of the current area.
`void` | `setTimeOfDay(int timeOfDay)` Sets the time of day it is.

Methods inherited from class com.huguesjohnson.tiamat.demos.Camineet.BaseGameState
`addCondition, getConditions, getCurrentArea, hasCondition, onDeserialize, setCurrentArea`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### TIME_DAY

    public static final int TIME_DAY

  constant for daytime

  See Also:
    Constant Field Values

### TIME_NIGHT

    public static final int TIME_NIGHT

  constant for nighttime

  See Also:
    Constant Field Values

Constructor Detail

### CDGameState

    public CDGameState()

  Create an empty CDGameState.

### CDGameState

    public CDGameState(java.lang.String[] conditions)

  Create a CDGameState with conditions but no Area.

Parameters:
  `conditions` - The initial conditions for this BaseGameState.

### CDGameState

    public CDGameState(Area currentArea)

  Create a BaseGameState with an Area but no conditions.

Parameters:
  `currentArea` - The new Area the game is currently in.

### CDGameState

    public CDGameState(Area currentArea,
                       java.lang.String[] conditions)

  Create a BaseGameState with conditions and an Area.

Parameters:
  `currentArea` - The new Area the game is currently in.
  `conditions` - The initial conditions for this BaseGameState.

### CDGameState

    public CDGameState(int timeOfDay)

  Create an empty CDGameState.

Parameters:
  `timeOfDay` - One of the time constants representing what time of day it is.

### CDGameState

    public CDGameState(java.lang.String[] conditions,
                       int timeOfDay)

  Create a CDGameState with conditions but no Area.

Parameters:
  `conditions` - The initial conditions for this BaseGameState.
  `timeOfDay` - One of the time constants representing what time of day it is.

### CDGameState

    public CDGameState(Area currentArea,
                       int timeOfDay)

  Create a BaseGameState with an Area but no conditions.

Parameters:
  `currentArea` - The new Area the game is currently in.
  `timeOfDay` - One of the time constants representing what time of day it is.

### CDGameState

    public CDGameState(Area currentArea,
                       java.lang.String[] conditions,
                       int timeOfDay)

  Create a BaseGameState with conditions and an Area.

Parameters:
  `currentArea` - The new Area the game is currently in.
  `conditions` - The initial conditions for this BaseGameState.
  `timeOfDay` - One of the time constants representing what time of day it is.

Method Detail

### getTimeOfDay

    public int getTimeOfDay()

  Returns one of the time constants representing what time of day it is.

  Returns:
    One of the time constants representing what time of day it is.

### setTimeOfDay

    public void setTimeOfDay(int timeOfDay)

  Sets the time of day it is.

  Parameters:
    `timeOfDay` - One of the time constants representing what time of day it is.

### getCurrentAreaName

    public java.lang.String getCurrentAreaName()

  Returns the name of the current area.

  Returns:
    The name of the current area.

### setCurrentAreaName

    public void setCurrentAreaName(java.lang.String areaName)

  Sets the name of the current area.

  Parameters:
    `areaName` - The new name of the current area.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD