From b3a0a026cbbd7461e0377b4ea9444e251d32e5b4 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 5 Apr 2024 01:54:34 -0400 Subject: [PATCH] Reset Command Added --- src/game/gameState.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/game/gameState.ts b/src/game/gameState.ts index 5863582..d2cacc6 100644 --- a/src/game/gameState.ts +++ b/src/game/gameState.ts @@ -77,6 +77,14 @@ class GameState { } } + /** + * Resets the current game state by saving the current state and then resetting the game state in the database. + */ + public async reset() { + await DatabaseService.saveGameState(this.authorId, this); + await DatabaseService.resetGameState(this.authorId) + } + } export default GameState