style: dart format 적용

- 전체 Dart 소스 및 테스트 파일 포매팅 통일
- trailing comma, 줄바꿈, 인덴트 정리
This commit is contained in:
JiWoong Sul
2026-02-13 16:08:23 +09:00
parent bccb5cb188
commit d07a0c5554
42 changed files with 460 additions and 422 deletions

View File

@@ -9,9 +9,8 @@ import 'package:asciineverdie/src/core/storage/statistics_storage.dart';
/// 세션 통계와 누적 통계를 관리하고, 게임 상태 변화에 따라
/// 통계를 자동 업데이트합니다.
class GameStatisticsManager {
GameStatisticsManager({
StatisticsStorage? statisticsStorage,
}) : _statisticsStorage = statisticsStorage ?? StatisticsStorage();
GameStatisticsManager({StatisticsStorage? statisticsStorage})
: _statisticsStorage = statisticsStorage ?? StatisticsStorage();
final StatisticsStorage _statisticsStorage;

View File

@@ -11,9 +11,8 @@ import 'package:flutter/foundation.dart';
///
/// 게임 클리어 시 캐릭터 등록, 테스트 캐릭터 생성 등을 담당합니다.
class HallOfFameManager {
HallOfFameManager({
HallOfFameStorage? hallOfFameStorage,
}) : _hallOfFameStorage = hallOfFameStorage ?? HallOfFameStorage();
HallOfFameManager({HallOfFameStorage? hallOfFameStorage})
: _hallOfFameStorage = hallOfFameStorage ?? HallOfFameStorage();
final HallOfFameStorage _hallOfFameStorage;

View File

@@ -107,7 +107,8 @@ class ResurrectionManager {
updatedMonetization = monetization.copyWith(autoReviveEndMs: buffEndMs);
debugPrint(
'[Resurrection] Ad revive complete, auto-revive buff until $buffEndMs ms');
'[Resurrection] Ad revive complete, auto-revive buff until $buffEndMs ms',
);
}
// 유료 유저는 광고 없이 부활

View File

@@ -49,8 +49,10 @@ class ReturnRewardsManager {
if (reward.hasReward) {
_pendingReturnReward = reward;
debugPrint('[ReturnRewards] Reward available: ${reward.chestCount} chests, '
'${reward.hoursAway} hours away');
debugPrint(
'[ReturnRewards] Reward available: ${reward.chestCount} chests, '
'${reward.hoursAway} hours away',
);
// UI에서 다이얼로그 표시를 위해 콜백 호출
// startNew 후에 호출하도록 딜레이
@@ -91,11 +93,13 @@ class ReturnRewardsManager {
loop?.replaceState(updatedState); // ProgressLoop 상태도 업데이트
// 저장
unawaited(saveManager.saveState(
updatedState,
cheatsEnabled: cheatsEnabled,
monetization: monetization,
));
unawaited(
saveManager.saveState(
updatedState,
cheatsEnabled: cheatsEnabled,
monetization: monetization,
),
);
_pendingReturnReward = null;
@@ -129,18 +133,19 @@ class ReturnRewardsManager {
reward.equipment!.itemWeight > currentItem.itemWeight) {
debugPrint('[ReturnRewards] Equipped: ${reward.equipment!.name}');
return state.copyWith(
equipment: state.equipment.setItemByIndex(
slotIndex,
reward.equipment!,
),
equipment: state.equipment.setItemByIndex(slotIndex, reward.equipment!),
);
}
// 더 좋지 않으면 판매 (골드로 변환)
final sellPrice =
(reward.equipment!.level * 50 * 0.3).round().clamp(1, 99999);
debugPrint('[ReturnRewards] Sold: ${reward.equipment!.name} '
'for $sellPrice gold');
final sellPrice = (reward.equipment!.level * 50 * 0.3).round().clamp(
1,
99999,
);
debugPrint(
'[ReturnRewards] Sold: ${reward.equipment!.name} '
'for $sellPrice gold',
);
return state.copyWith(
inventory: state.inventory.copyWith(
gold: state.inventory.gold + sellPrice,
@@ -152,8 +157,10 @@ class ReturnRewardsManager {
GameState _applyPotionReward(GameState state, ChestReward reward) {
if (reward.potionId == null) return state;
debugPrint('[ReturnRewards] Added potion: ${reward.potionId} '
'x${reward.potionCount}');
debugPrint(
'[ReturnRewards] Added potion: ${reward.potionId} '
'x${reward.potionCount}',
);
return state.copyWith(
potionInventory: state.potionInventory.addPotion(
reward.potionId!,

View File

@@ -12,8 +12,8 @@ class SpeedBoostManager {
SpeedBoostManager({
required bool Function() cheatsEnabledGetter,
required Future<List<int>> Function() getAvailableSpeeds,
}) : _cheatsEnabledGetter = cheatsEnabledGetter,
_getAvailableSpeeds = getAvailableSpeeds;
}) : _cheatsEnabledGetter = cheatsEnabledGetter,
_getAvailableSpeeds = getAvailableSpeeds;
final bool Function() _cheatsEnabledGetter;
final Future<List<int>> Function() _getAvailableSpeeds;
@@ -52,7 +52,10 @@ class SpeedBoostManager {
int get speedBoostDuration => _speedBoostDuration;
/// 속도 부스트 남은 시간 (초) - 게임 시간(elapsedMs) 기준 계산
int getRemainingSeconds(MonetizationState monetization, int currentElapsedMs) {
int getRemainingSeconds(
MonetizationState monetization,
int currentElapsedMs,
) {
if (!_isSpeedBoostActive) return 0;
final endMs = monetization.speedBoostEndMs;
if (endMs == null) return 0;
@@ -203,7 +206,10 @@ class SpeedBoostManager {
if (_isSpeedBoostActive) {
// 부스트 상태: 부스트 배속만 사용, 기본 배속 저장
savedSpeedMultiplier = baseSpeed;
return (speeds: [speedBoostMultiplier], initialSpeed: speedBoostMultiplier);
return (
speeds: [speedBoostMultiplier],
initialSpeed: speedBoostMultiplier,
);
}
// 일반 상태: 기본 배속 사용
return (speeds: baseAvailableSpeeds, initialSpeed: baseSpeed);