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