Add reset method.
This commit is contained in:
parent
3441e5acd2
commit
8e5cc3a612
1 changed files with 7 additions and 0 deletions
|
|
@ -58,6 +58,13 @@ export class Deck<T> {
|
|||
};
|
||||
|
||||
|
||||
public reset() {
|
||||
this._deck.push(...this._discard, ...this._unknown);
|
||||
this._discard = [];
|
||||
this._unknown = [];
|
||||
};
|
||||
|
||||
|
||||
public toJSON(): datastoreDeck<T> {
|
||||
/**
|
||||
* Converts this Deck into a JSON-compatible object
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue