Skip to content

Feature: Added ejection popup UI displaying player ejected/voted off#12

Open
ellapitts wants to merge 2 commits intohaplesshero13:mainfrom
ellapitts:main
Open

Feature: Added ejection popup UI displaying player ejected/voted off#12
ellapitts wants to merge 2 commits intohaplesshero13:mainfrom
ellapitts:main

Conversation

@ellapitts
Copy link
Collaborator

@ellapitts ellapitts commented Feb 24, 2026

Implemented a simple popup to display the voting results/ejections in the center of the screen.

  • Added a flag variable to ensure the popup only shows once per ejection over the spectator view. (game.html)
  • Popups clear after 5 seconds.
  • Fixed server.py to consistently send the text log so ejections are never missed.
  • Updated the voteout method to include a player's color in the string so the popup is informative (game.py in amongagents/...)

ejection_text = f"{eliminated_player.name} ({eliminated_player.color}) was ejected!"
system_announcement += f"{ejection_text}\n"

if self.UI and hasattr(self.UI, "show_ejected_player"):
Copy link
Owner

Choose a reason for hiding this comment

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

Actually, can you move this BELOW the "no one was ejected" so you can show both cases?

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.

2 participants