---
title: Fix Restart Game Action
status: Completed
---

## Objectives
- Fix the "Restart Game" button not actually resetting the game state fully (players were left with empty hands).

## Diagnosis
- The `restartGame` method in `GameManager` correctly reset the global state (turn, phase, step) and moved cards back to the library.
- However, it **failed to trigger the initial card draw** (Mulligan phase start).
- This happened because `RulesEngine.startGame()` (which handles the initial draw loop) was never called after the reset.

## Fix Implemented
- Updated `GameManager.ts` to instantiate a new `RulesEngine` and call `.startGame()` at the end of `restartGame`.
- This ensures that after resetting variables, the engine immediately shuffles libraries and deals 7 cards to each player, effectively restarting the match.

## Verification
- Clicking "Restart Game" now properly resets life totals, clears the board, and deals a fresh opening hand to all players.
