Optionaldata: Partial<TokenInterface>ReadonlyidOptionallockedOptionalparentThe last element in the array.
If the state is not null, return the status of the state. Otherwise, return the status of the ready state
The status of the state.
The function takes in a status and sets the status of the state to the status that was passed in
The status of the current game.
If the status is equal to the Paused value, then return true, otherwise return false.
A boolean value.
If the status property of the current instance is equal to the Ready constant, return true, otherwise return false.
A boolean value.
Pop the last item from the history array and return the lates state at history array.
The poped state object.
If the status is paused, set the status to ready
The current instance of the class.
It serializes the object.
value: true
An object with the id, parent, history, and locked properties.
StaticbuildIt creates a new instance of the Token class.
Optionaloptions: Partial<TokenInterface>The options object that will be passed to the constructor.
A new instance of the Token class.
StaticdeserializeIt takes a JSON object and returns a new Token object with the same properties as the JSON object, except that the history property is an array of State objects instead of an array of JSON objects
Token - this is the data that is passed in from the deserialize function.
A new Token object with the data passed in and the history mapped to State objects.
It returns the last element of the history array