refactor(game): 게임 화면 및 위젯 정리

This commit is contained in:
JiWoong Sul
2026-01-12 16:17:20 +09:00
parent 104d23cdfd
commit cbbbbba1a5
13 changed files with 662 additions and 570 deletions

View File

@@ -223,15 +223,14 @@ class GameSessionController extends ChangeNotifier {
notifyListeners();
}
Future<void> loadAndStart({
String? fileName,
}) async {
Future<void> loadAndStart({String? fileName}) async {
_status = GameSessionStatus.loading;
_error = null;
notifyListeners();
final (outcome, loaded, savedCheatsEnabled) =
await saveManager.loadState(fileName: fileName);
final (outcome, loaded, savedCheatsEnabled) = await saveManager.loadState(
fileName: fileName,
);
if (!outcome.success || loaded == null) {
_status = GameSessionStatus.error;
_error = outcome.error ?? 'Unknown error';
@@ -346,7 +345,9 @@ class GameSessionController extends ChangeNotifier {
combatStats: combatStats,
);
debugPrint('[HallOfFame] Entry created: ${entry.characterName} Lv.${entry.level}');
debugPrint(
'[HallOfFame] Entry created: ${entry.characterName} Lv.${entry.level}',
);
final success = await _hallOfFameStorage.addEntry(entry);
debugPrint('[HallOfFame] Storage save result: $success');