diff --git a/src/managers/GridManager.ts b/src/managers/GridManager.ts index 7abf614..1e20bec 100644 --- a/src/managers/GridManager.ts +++ b/src/managers/GridManager.ts @@ -109,6 +109,20 @@ export class GridManager { return this.tiles; } + /** + * Clear tiles (mark as cleared and emit events) + * @param tiles - Array of tiles to clear + */ + clearTiles(tiles: Tile[]): void { + tiles.forEach(tile => { + tile.cleared = true; + this.events.emit('tile:cleared', { tile }); + }); + + // Clear selection after clearing tiles + this.deselectAll(); + } + /** * Get the event emitter for external subscription */