Function createCurrentPlayerValidation

  • Creates a validation helper bound to the current user and game room. This is used to validate whether a user can perform actions as a specific player in the game. (a user can only move as a player if they have taken that seat in the game room).

    Parameters

    • ctx: Context

      Request context.

    • gameId: number

      Target game id.

    Returns CurrentPlayerValidation

    Validation callbacks used by game actions.