Skip to content

Fix missing marble initialization in web version#63

Merged
durangogt merged 2 commits into
mainfrom
copilot/fix-initial-marble-display
Feb 9, 2026
Merged

Fix missing marble initialization in web version#63
durangogt merged 2 commits into
mainfrom
copilot/fix-initial-marble-display

Conversation

Copilot AI commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

Web version omitted the marble rendering loop at game start. drawBoard() only renders the board template; marbles must be drawn separately via drawPlayerBox().

Changes

  • Added marble initialization loop after drawBoard() call in web/aggravation_web.py (lines 263-269)
  • Matches desktop version implementation exactly (aggravation.py lines 342-347)
# Draw initial marbles in home for all players
for player_num in range(1, 5):
    player_color = PLAYER_COLORS[player_num]
    player_home = get_player_home(game, player_num)
    for home_pos in player_home:
        if home_pos and home_pos != (None, None):
            drawPlayerBox(player_color, home_pos)

Result

All 16 marbles (4 per player) now render at game start in their respective home corners instead of showing empty white squares.

Original prompt

This section details on the original issue you should resolve

<issue_title>web version showing aggravation mechanics correctly but starts out with no marbles shown</issue_title>
<issue_description>See screenshot below - this is when the game starts - no marbles drawn in the initial home spots. Fix this & explain why this happened, also what are the steps to test this when in a branch vs merged to master again?

Image

</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: durangogt <10979447+durangogt@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix initial home spots to show marbles on game start Fix missing marble initialization in web version Feb 9, 2026
Copilot AI requested a review from durangogt February 9, 2026 22:30
@durangogt
durangogt marked this pull request as ready for review February 9, 2026 22:33
@durangogt
durangogt merged commit 24fd4b9 into main Feb 9, 2026
3 checks passed
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.

web version showing aggravation mechanics correctly but starts out with no marbles shown

2 participants