Skip to content

Missing Tie-Breaker Logic solved#95

Merged
FOSSCLUB-LBSITW merged 1 commit into
FOSSCLUB-LBSITW:mainfrom
annrose2277-glitch:master
Mar 9, 2026
Merged

Missing Tie-Breaker Logic solved#95
FOSSCLUB-LBSITW merged 1 commit into
FOSSCLUB-LBSITW:mainfrom
annrose2277-glitch:master

Conversation

@annrose2277-glitch
Copy link
Copy Markdown
Contributor

📌 Description

When a multiplayer game ends in a tie, the game will now correctly display a message like "It's a Tie between Players 1 & 2
instead of crashing. Single-player and single-winner games continue to display their respective victory messages correctly.

🔗 Related Issue

Closes: #92


🛠 Changes Made

In showCongratulations():
Removed the logic that attempted to use undeclared variables (tieMode, tiePlayers) and the non-existent startTieBreaker()
function.
Updated the logic to use an if/else block that gracefully handles ties by joining the winner names with " & " and displaying a
friendly message in the UI popup.
In disableBlocks():
Replaced the manual popup display with a call to showCongratulations(), ensuring the correct winner or tie message is calculated
and shown when the game ends.

📷 Screenshots (if applicable)


✅ Checklist

  • [yes ] I have tested my changes
  • [yes ] My code follows project guidelines
  • [ yes] I have linked the related issue

@github-actions github-actions Bot added bug Something isn't working HackTheStack as a part of hack the stack event level-1 labels Mar 9, 2026
@FOSSCLUB-LBSITW FOSSCLUB-LBSITW merged commit cd0cd18 into FOSSCLUB-LBSITW:main Mar 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working HackTheStack as a part of hack the stack event level-1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The "Missing Tie-Breaker Logic" Bug

2 participants