Skip to content

display-game-situations#204

Closed
zigdiggity wants to merge 1 commit intodhmay:mainfrom
zigdiggity:display-game-situations
Closed

display-game-situations#204
zigdiggity wants to merge 1 commit intodhmay:mainfrom
zigdiggity:display-game-situations

Conversation

@zigdiggity
Copy link
Copy Markdown

Display text related to various game situations in Caller Dashboard.

# Check if there is a power start, i.e. one team has a jammer in the penalty box.

result = []
if derby_game.game_data_dict.get("team1_jammer_in_box", False):
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's rare, but both jammers can start in the box, in which case this logic fails. That can happen if, at the end of a jam, one jammer's in the box and the other's headed to the box. 7.3.1.1 here: https://wftda.org/rules/all/20130615

return result


def get_lead_change_items(derby_game: DerbyGame) -> list:
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will miss lead changes within a jam... not sure if that's a case worth trying to solve for, because I think it'd be complicated.

@erevrav
Copy link
Copy Markdown
Collaborator

erevrav commented Mar 3, 2026 via email

@zigdiggity
Copy link
Copy Markdown
Author

Fwiw, it's totally possible for the folks at the scorer's table to initially mis-record which team got lead before sorting it out. (whether the table made the error or being downstream from JR confusion on who got lead.) to my knowledge, all versions of CRG do fine when you tell it "white has lead" and then change to "black has lead", so ideally jamstats would recover gracefully. Sent from Ninehttp://www.9folders.com/
________________________________ From: Damon May @.***> Sent: Monday, March 2, 2026 9:02 PM To: dhmay/jamstats Cc: Subscribed Subject: Re: [dhmay/jamstats] display-game-situations (PR #204) @dhmay commented on this pull request.
________________________________ In src/jamstats/tables/jamstats_tables.py<#204 (comment)>:
+

  • past_jammers_1 = set(derby_game.pdf_jams_data["jammer_name_1"].dropna().tolist()) + past_jammers_2 = set(derby_game.pdf_jams_data["jammer_name_2"].dropna().tolist()) + + result = [] + jammer_1 = derby_game.game_data_dict.get("team_1_jammer_name", "") + jammer_2 = derby_game.game_data_dict.get("team_2_jammer_name", "") + + if jammer_1 and jammer_1 not in past_jammers_1: + result.append(f"{jammer_1} first time jamming") + if jammer_2 and jammer_2 not in past_jammers_2: + result.append(f"{jammer_2} first time jamming") + return result + + +def get_lead_change_items(derby_game: DerbyGame) -> list: This will miss lead changes within a jam... not sure if that's a case worth trying to solve for, because I think it'd be complicated. — Reply to this email directly, view it on GitHub<#204 (review)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGJK5J5HDCKI72NDL2GQ4MT4OZRNZAVCNFSM6AAAAACWE4C222VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTQOBQGI2TINRQGM. You are receiving this because you are subscribed to this thread.Message ID: @.***>

@zigdiggity zigdiggity closed this Mar 3, 2026
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to work great! Some thoughts about the visuals:

  • Most importantly: I haven't tried to make a long list of items happen, but I don't see anything in the code to truncate the list of items at a certain number. Seems like that could be important, because it would push the rest of the UI down the screen. Variant idea: allow as many items as there happen to be, but put them in a pane with a scrollbar.
  • Related: could you squeeze the updates to the right of the top summary table? Maybe change "Total penalties" to "Penalties" in the header and get rid of "(absolute)" to make it fit.
  • The items are kind of lost in the UI, a nondescript bullet list below the summary table. Maybe put a border around it and give a different background color?
  • Maybe define a few broad categories of items (e.g., timeout, lead change, jammer stuff (incl. power start), pack advantage) and make them different text colors? Or, if that might be confusing because of team colors, make them different shades of grey / boldnesses / italics?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To @erevrav 's point about the potential for lead to get mis-recorded and then corrected... maybe the best way to arrange these items on the caller dashboard would be like a news feed, with the most recent one at the top and a clear visual indicator of the order from most to least recent (e.g., least recent is grey text). That way, if any item gets superseded by a newer item, that'd be clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants