The game engine has an event based architecture: Each game event is handled by a dedicated handler.
We can implement the THROW_CARD event now, since the card creation logic is complete.
Tasks
Since different cards behave differently, the handler should consider all such cases. For example, it should reverse the turn flow if a reverse card is thrown etc.
It should also check whether it is possible to throw a card or not, and return success or error accordingly.
The handler logic should be verified through tests using appropriate testcases.
Please refer to this file
Description
The game engine has an event based architecture: Each game event is handled by a dedicated handler. We can implement the
THROW_CARD
event now, since the card creation logic is complete.Tasks
Notes
Please refer to the global types related to this.