Files
BlockSeasons/lib/game/engine/game_event.dart
T
airkjw 62cbb4b16a 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>
2026-06-11 13:11:31 +09:00

29 lines
617 B
Dart

import '../models/piece.dart';
/// Events emitted by the engine during a placement, consumed by objectives
/// and (later) the UI effects layer.
sealed class GameEvent {
const GameEvent();
}
class PiecePlaced extends GameEvent {
const PiecePlaced({required this.piece, required this.x, required this.y});
final Piece piece;
final int x;
final int y;
}
class LinesCleared extends GameEvent {
const LinesCleared({required this.lines, required this.gems});
final int lines;
final int gems;
}
class ScoreChanged extends GameEvent {
const ScoreChanged({required this.total});
final int total;
}