feat(engine): hammer booster removes one cell, no scoring

This commit is contained in:
2026-06-18 12:02:55 +09:00
parent 4cda34f0b7
commit 5aee503c09
2 changed files with 60 additions and 0 deletions
+11
View File
@@ -216,4 +216,15 @@ class GameEngine {
}
_phase = GamePhase.lost;
}
/// Booster: empties one filled cell. No move/score/combo/objective effect.
/// Allowed only mid-attempt (playing or stuck). Returns false on an empty
/// cell or finished attempt so the caller keeps the booster.
bool useHammer(int x, int y) {
if (_phase == GamePhase.won || _phase == GamePhase.lost) return false;
if (!_grid.isOccupied(x, y)) return false;
_grid = _grid.withCell(x, y, const Cell(CellType.empty));
_checkStuck();
return true;
}
}