feat: add human http agent
This commit is contained in:
@@ -152,6 +152,7 @@ class HandSummary:
|
||||
board: list[Card]
|
||||
actions: list[ActionRecord]
|
||||
awards: list[PotAward]
|
||||
showdown_hands: dict[str, list[Card]] = field(default_factory=dict)
|
||||
started_at: float = field(default_factory=time)
|
||||
finished_at: float = field(default_factory=time)
|
||||
|
||||
@@ -163,6 +164,13 @@ class HandSummary:
|
||||
"board": [str(card) for card in self.board],
|
||||
"actions": [record.to_dict() for record in self.actions],
|
||||
"awards": [award.to_dict() for award in self.awards],
|
||||
# ``showdown_hands`` is only populated when more than one player
|
||||
# remained eligible for a pot; empty dict means the hand ended
|
||||
# without a showdown (e.g. everyone folded but the winner).
|
||||
"showdown_hands": {
|
||||
player_id: [str(card) for card in cards]
|
||||
for player_id, cards in self.showdown_hands.items()
|
||||
},
|
||||
"started_at": self.started_at,
|
||||
"finished_at": self.finished_at,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user