diff --git a/server/src/objects/Deck.ts b/server/src/objects/Deck.ts index 1d04a7b..78ae90c 100644 --- a/server/src/objects/Deck.ts +++ b/server/src/objects/Deck.ts @@ -56,4 +56,16 @@ export class Deck { this._unknown = this._unknown.filter(x => x != card); this._discard.push(card); }; + + + public toJSON(): datastoreDeck { + /** + * Converts this Deck into a JSON-compatible object + */ + return { + deck: this._deck, + unknown: this._unknown, + discard: this._discard, + }; + }; }; \ No newline at end of file