fix(06): connect GridManager events to Game match handler

Bug: Game was listening on its own events emitter for 'tilesSelected'
but GridManager emits on its own events emitter.
Fix: Changed listener from this.events to this.gridManager.events
This commit is contained in:
2026-03-11 14:18:03 +00:00
parent 47e07be234
commit 2f91b99d64
+2 -2
View File
@@ -65,8 +65,8 @@ export class Game {
// Create game loop with update callback
this.loop = new GameLoop(this.update.bind(this));
// Listen for tilesSelected event and validate matches
this.events.on('tilesSelected', ({ tile1, tile2 }) => {
// Listen for tilesSelected event from GridManager and validate matches
this.gridManager.events.on('tilesSelected', ({ tile1, tile2 }) => {
const result = this.matchEngine.validateMatch(tile1, tile2);
if (result.valid) {