The game state type returned by the API.
The tuple of argument types accepted by the API exec function.
The game configuration type.
The hint type embedded in the game state.
Configuration for the base hook.
Common trick-taking game state and action handlers.
Factory hook that encapsulates the common logic shared by all trick-taking game hooks (Hearts, Spades, etc.). Handles card selection, config management, hint state, and the standard set of game commands (play, next trick, next round, hint).
Game-specific actions (e.g.
handlePassfor Hearts,handleBidfor Spades) should be built on top of the returnedexecfunction in the game-specific hook.