mirror of
https://github.com/tiennm99/gsd-framework.git
synced 2026-08-09 02:24:28 +00:00
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 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user