Skip to main content

score_dealer

Function score_dealer 

Source
pub async fn score_dealer(
    server_state: ServerState,
    user_id: UserId,
    game_id: GameId,
) -> Result<(), ServerError>
Expand description

Acknowledges the current pone score and goes on to score the dealer’s hand 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 performing the scoring.
  • game_id: The ID of the game containing the dealer’s hand.

§Returns

Returns Ok(()) if the dealer’s hand was successfully scored. Returns a ServerError if the action is forbidden, the game is not found, or another internal error occurs.