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. |
Members
allPlayersCreated :boolean
whether or not all players in this group have been created yet.
Type:
- boolean
id :String
this group's id
Type:
- String
outputHide :array
'outputHide' fields are not included in output.
Type:
- array
outputHideAuto :Array.<String>
'outputHideAuto' fields are not included in output.
Type:
- Array.<String>
period :Period
Each Group belongs to a single Period.
Type:
players :array
a list of the players in this group.
Type:
- array
stageIndex :number
Type:
- number
tables :array
Type:
- array
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. |
Returns:
The group.
- Type
- Group
app() → {App}
Returns the app this group is in.
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. |
emitUpdate() → {type}
emitUpdate - description
Returns:
description
- Type
- type
isFinished() → {type}
isFinished - description
Returns:
description
- Type
- type
old() → {type}
old - description
Returns:
description
- Type
- type
playerByParticipantId(id) → {type}
Find the player with the given participant ID.
Parameters:
Name | Type | Description |
---|---|---|
id |
String | the given id. |
Returns:
the player where player.participant.id == id.
- Type
- type
playersExcept(player) → {type}
playersExcept - description
Parameters:
Name | Type | Description |
---|---|---|
player |
type | description |
Returns:
description
- Type
- type
playerWithParticipant(participant) → {type}
playerWithParticipant - description
Parameters:
Name | Type | Description |
---|---|---|
participant |
type | description |
Returns:
description
- Type
- type
roomId() → {type}
roomId - description
Returns:
description
- Type
- type
save()
save - description
session()
session - description
Returns:
Session The session that this group belongs to.
shell() → {type}
shellLocal - description
Returns:
description
- Type
- type
shellWithChildren() → {type}
shellAll - description
Returns:
description
- Type
- type
shellWithParent() → {type}
shell - description
Returns:
description
- Type
- type
stage()
Returns the stage that this group is currently in.
sum(field)
Returns the sum of "field" over all players in the group.
Parameters:
Name | Type | Description |
---|---|---|
field |
String |