0
0
Fork 0

Add reset method.

This commit is contained in:
Oliver-Akins 2021-01-07 18:15:41 -07:00
parent 3441e5acd2
commit 8e5cc3a612

View file

@ -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> { public toJSON(): datastoreDeck<T> {
/** /**
* Converts this Deck into a JSON-compatible object * Converts this Deck into a JSON-compatible object