def get_payoff_gin_rummy_v0(player: GinRummyPlayer, game: 'GinRummyGame') -> int:
    ''' Get the payoff of player: deadwood_count of player

    Returns:
        payoff (int or float): payoff for player (lower is better)
    '''
    moves = game.round.move_sheet
    if player.player_id == 0:
        score_player_move = moves[-2]
        if not isinstance(score_player_move, ScoreNorthMove):
            raise GinRummyProgramError("score_player_move must be ScoreNorthMove.")
    else:
        score_player_move = moves[-1]
        if not isinstance(score_player_move, ScoreSouthMove):
            raise GinRummyProgramError("score_player_move must be ScoreSouthMove.")
    deadwood_count = score_player_move.deadwood_count
    return deadwood_count
 Get the payoff of player: deadwood_count of player

    Returns:
        payoff (int or float): payoff for player (lower is better)
    
rlcard/games/gin_rummy/utils/scorers.py