Description
Build an events module that provides a lightweight internal event bus for decoupled communication between modules. Rather than sessions directly calling scoring, rewards, achievements, and notifications, they emit events that each module listens to independently. This keeps modules loosely coupled and makes it easy to add new side effects without modifying the originating module.
Acceptance Criteria
Description
Build an
eventsmodule that provides a lightweight internal event bus for decoupled communication between modules. Rather than sessions directly calling scoring, rewards, achievements, and notifications, they emit events that each module listens to independently. This keeps modules loosely coupled and makes it easy to add new side effects without modifying the originating module.Acceptance Criteria
eventsmodule is scaffolded atsrc/events/EventEmitter2is used as the underlying bussession.completed,score.updated,achievement.unlocked,reward.grantedanyobjects