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;
}
