全体フロー
flowchart TD
Launch([起動]) --> App[BlockPuzzleApp]
App --> Home[HomeView
NavigationStack]
Home --> Game[GameView]
Home --> Settings[SettingsView]
Home --> Stats[StatisticsView]
Game --> GameOver[GameOverView
オーバーレイ]
GameOver -- Retry --> Game
GameOver -- Watch Ad --> Reward[Rewarded広告]
Reward --> Game
GameOver -- Mode Select --> Home
GameOver -- Share --> ShareSheet[ShareSheet]
Settings --> Paywall[PaywallView]
Paywall -- 購入 --> Settings
ゲーム画面の状態遷移
flowchart LR
Init[GameState .playing] --> Place[ブロック配置]
Place --> Check{ライン揃い?}
Check -- yes --> Clear[ライン消去演出]
Clear --> Combo{連続消去?}
Combo -- yes --> ComboPlus[combo+1]
ComboPlus --> Init
Combo -- no --> ResetCombo[combo=0]
ResetCombo --> Init
Check -- no --> Refill{トレイ全消費?}
Refill -- yes --> NewBlocks[新トレイ生成]
NewBlocks --> Check2{配置可能?}
Check2 -- no --> Over[GameState .gameOver]
Refill -- no --> Init
主要な遷移トリガー
| 起点 | 操作 | 遷移先 |
| HomeView | Playボタン | GameView |
| GameView | ゲームオーバー判定 | GameOverView(オーバーレイ) |
| GameOverView | Watch Ad | Rewarded広告 → ゲーム継続 |
| GameOverView | Restart | GameView(リセット) |
| HomeView | Settings | SettingsView |
画面ID対応表
| 画面ID | 画面 | ファイル |
| PZ-HOME-01 | ホーム | Views/Home/HomeView.swift |
| PZ-GAME-01 | ゲーム | Views/Game/GameView.swift |
| PZ-OVER-01 | ゲーム終了 | Views/GameOver/GameOverView.swift |
| PZ-SET-01 | 設定 | Views/Settings/SettingsView.swift |
| PZ-STATS-01 | 統計 | Views/Statistics/StatisticsView.swift |
| PZ-PAY-01 | Paywall | Views/Paywall/PaywallView.swift |
変更履歴
| バージョン | 日付 | 変更内容 |
|---|
| 1.0 | 2026-05-09 | 初版作成 |