ServingState
The ServingState dataclass encapsulates the serving team, player, receiver, and court side for the upcoming/next point in the match. It is exposed through the server property of the MatchScore.
Properties
- Name
team- Type
- TeamId
- Description
The
TeamIdabout to serve the upcoming/next point (TeamId.AorTeamId.B).
- Name
player- Type
- Player | None
- Description
The specific
Playerabout to serve the upcoming/next point, orNoneif player details are not configured.
- Name
receiver- Type
- Player | None
- Description
The specific
Playerabout to receive the upcoming/next serve, orNoneif team details are not configured.
- Name
court_side- Type
- 'left' | 'right' | None
- Description
The side of the court from which the serve is executed (
"left"or"right"), orNone.
Initialization
Creates a new instance of a ServingState.
Keyword Arguments
- Name
team- Type
- TeamId
- Description
The
TeamIdabout to serve the upcoming/next point (TeamId.AorTeamId.B).
- Name
player- Type
- Player | None
- Description
The specific
Playerabout to serve the upcoming/next point, orNoneif player details are not configured.
- Name
receiver- Type
- Player | None
- Description
The specific
Playerabout to receive the upcoming/next serve, orNoneif player details are not configured.
- Name
court_side- Type
- 'left' | 'right' | None
- Description
The side of the court from which the serve is executed (
"left"or"right"), orNone.
Instantiation
from padelkit import ServingState, TeamId, Player
server_state = ServingState(
team=TeamId.A,
player=Player(name="A. Galán"),
receiver=Player(name="F. Belasteguín"),
court_side="right"
)
Output structure
ServingState(
team=<TeamId.A: 'A'>,
player=Player(name='A. Galán', ...),
receiver=Player(name='F. Belasteguín', ...),
court_side='right'
)