Class: Game

HungryGames~ Game


new Game( [name] [, includedUsers] [, teams])

Create a game with basic game information.
Parameters:
Name Type Argument Description
name string <optional>
The name of this game.
includedUsers Array.<HungryGames~Player> <optional>
Array of user players that are included in this game.
teams Array.<HungryGames~Team> <optional>
Array of teams that have been formed already.
Source:

Members


day :HungryGames~Day

Information about the day that was simulated.
Type:
Source:

ended :boolean

Has the game ended.
Type:
  • boolean
Source:

includedUsers :Array.<HungryGames~Player>

Array of all users currently in the game.
Type:
Source:

inProgress :boolean

Is the game currently in progress.
Type:
  • boolean
Source:

isPaused :boolean

Is this game currently paused.
Type:
  • boolean
Source:

name :string

The name of this game.
Type:
  • string
Default Value:
  • 'Hungry Games'
Source:

nextDay :HungryGames~Day

Information about the next day to be simulated. Usually empty, but this data will replace HungryGames~Game when a new day starts.
Type:
Source:

numAlive :number

The number of players still alive in this game.
Type:
  • number
Source:

<nullable> prevDay :HungryGames~Day

Information about the previous day that was simulated. It is replaced by HungryGames~Game when a new day starts and defaults to before the first day.
Type:
Source:

teams :Array.<HungryGames~Team>

All teams in the game.
Type:
Default Value:
  • []
Source:

Methods


<static> from(data)

Create a new Game from an object. Similar to a copy constructor.
Parameters:
Name Type Description
data object Game like object to copy.
Source:
Returns:
Created Game object.
Type
HungryGames~Game