pub async fn score_crib(
server_state: ServerState,
user_id: UserId,
game_id: GameId,
) -> Result<(), ServerError>Expand description
Acknowledges the current dealer score and goes on to score the crib for the specified user if both players have acknowledged.
§Parameters
server_state: The shared server state containing the game and database.user_id: The ID of the user scoring the crib.game_id: The ID of the game containing the crib.
§Returns
Returns Ok(()) if the crib was successfully scored.
Returns a ServerError if the action is forbidden, the game is not found,
the crib cannot be scored yet, or another internal error occurs.