Skip to content

The Player class

Ondolin edited this page Mar 7, 2021 · 1 revision

Each torchly Player should be an instance of the Player class.

In the following, all variables and functions will be explained.

Property name type description
name string the player's name or pseudonym (should be unique to avoid confusion two equal names does not cause any problems)
id  string unique id to identify a player
gm  boolean true if a player has access to game-master (gm) features

All of these properties are necessary to create a new player.

Function name return type parameter description
getCharacters Character[] - returns all characters controlled by this player
delete void - deletes this player
Clone this wiki locally