Following the pattern of THROW_CARD, we need to have a handler for the JOIN_GAME event. This should reside in a file in uno-game-engine/events.
Specs
The event handler should validate the event, apply it on the respective game, and return a result indicating whether the event was successfully applied or some error occured.
Notes
Be mindful of subtle corner cases and bugs.
Take the existing handlers as a reference to know how handlers are supposed to work.
Refer to the type of the event object for the event.
Description
Following the pattern of
THROW_CARD
, we need to have a handler for theJOIN_GAME
event. This should reside in a file inuno-game-engine/events
.Specs
The event handler should validate the event, apply it on the respective game, and return a result indicating whether the event was successfully applied or some error occured.
Notes