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

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

endStageForSilentPlayers()

Ends stage for players still in it, after it timed out and their page did not submit.

Source:

forceEndStage()

The stage timed out: ends it for players who have not ended it, marking them
Player#timedOut.

Source:

inAllPeriods()

The groups with this group's id in this app's periods, from the first to this one.

Source:

inPeriod()

The group with this group's id in period n (from 1) of this app, or null if there is none yet.

Source:

inPreviousPeriods()

The groups with this group's id in this app's periods before this one, first first.

Source:

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

playerWithParticipant(participant) → {type}

playerWithParticipant - description

Parameters:
Name Type Description
participant type

description

Source:
Returns:

description

Type
type

playersExcept(player) → {type}

playersExcept - description

Parameters:
Name Type Description
player type

description

Source:
Returns:

description

Type
type

restoreStageTimer()

For a group loaded from a session's file (see Group.load), starts the stage timer it
had. The stage's time ran until jtree stopped (lastTimeOn) and stood still while it was
off; time already up ends the stage straight away.

Source:

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:

startStageTimer()

Starts the timer that ends stage for this group (see forceEndStage) in ms milliseconds.

Source:

sum(field)

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

Parameters:
Name Type Description
field String
Source:

(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