Class: Group

Group(id, period)

A group of players playing in a Period.

Constructor

new Group(id, period)

Create a new Group.

Parameters:
Name Type Description
id String

The id of this group.

period Period

The period this group belongs to.

Source:

Members

allPlayersCreated :boolean

whether or not all players in this group have been created yet.

Type:
  • boolean
Default Value:
  • false
Source:

id :String

this group's id

Type:
  • String
Source:

outputHide :array

'outputHide' fields are not included in output.

Type:
  • array
Default Value:
  • []
Source:

outputHideAuto :Array.<String>

'outputHideAuto' fields are not included in output.

Type:
  • Array.<String>
Source:

period :Period

Each Group belongs to a single Period.

Type:
Source:

players :array

a list of the players in this group.

Type:
  • array
Default Value:
  • []
Source:

stageIndex :number

Type:
  • number
Default Value:
  • 0
Source:

tables :array

Type:
  • array
Default Value:
  • []
Source:

Methods

(static) load(json, session) → {Group}

Loads the group from a given set of data.

CALLED FROM:

  • Session#load
Parameters:
Name Type Description
json type

The JSON data describing the group.

session type

The session to which the group belongs.

Source:
Returns:

The group.

Type
Group

app() → {App}

Returns the app this group is in.

Source:
Returns:

The app.

Type
App

emit(msgTitle, msgData)

Emit the given message to subscriber's of this group.

Parameters:
Name Type Description
msgTitle type

The title of the message.

msgData type

The data of the message.

Source:

emitUpdate() → {type}

emitUpdate - description

Source:
Returns:

description

Type
type

isFinished() → {type}

isFinished - description

Source:
Returns:

description

Type
type

old() → {type}

old - description

Source:
Returns:

description

Type
type

playerByParticipantId(id) → {type}

Find the player with the given participant ID.

Parameters:
Name Type Description
id String

the given id.

Source:
Returns:

the player where player.participant.id == id.

Type
type

playersExcept(player) → {type}

playersExcept - description

Parameters:
Name Type Description
player type

description

Source:
Returns:

description

Type
type

playerWithParticipant(participant) → {type}

playerWithParticipant - description

Parameters:
Name Type Description
participant type

description

Source:
Returns:

description

Type
type

roomId() → {type}

roomId - description

Source:
Returns:

description

Type
type

save()

save - description

Source:

session()

session - description

Source:
Returns:

Session The session that this group belongs to.

shell() → {type}

shellLocal - description

Source:
Returns:

description

Type
type

shellWithChildren() → {type}

shellAll - description

Source:
Returns:

description

Type
type

shellWithParent() → {type}

shell - description

Source:
Returns:

description

Type
type

stage()

Returns the stage that this group is currently in.

Source:

sum(field)

Returns the sum of "field" over all players in the group.

Parameters:
Name Type Description
field String
Source: