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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user