Add objectives, stage config, and GameEngine session core

Sealed Objective types (clearGems/reachScore/clearLines) with JSON
round-trip; StageConfig with preset cells and star thresholds;
GameEngine orchestrating placement -> clear -> scoring -> objectives
with stuck detection, one-shot rescue (continue / +5 moves), and
deterministic per-attempt RNG. 100-game headless stress test and
pure-Dart architecture guard. 76 tests green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-06-11 13:11:31 +09:00
parent 0210c14858
commit 62cbb4b16a
10 changed files with 886 additions and 1 deletions
+1 -1
View File
@@ -97,7 +97,7 @@ class PieceGenerator {
break;
}
}
final tray = <Piece>[if (largestFitting != null) largestFitting];
final tray = <Piece>[?largestFitting];
for (final p in bySizeDesc.reversed) {
if (tray.length == traySize) break;
if (tray.any((t) => t.id == p.id)) continue;