Skip to main content

score_pone

Function score_pone 

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

Acknowledges the end of plays and goes on to score the pone’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 pone’s hand.

§Returns

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