Skip to content

Add loot-progress punctuation to normal piece move-card indicator - #10

Open
jmegner wants to merge 2 commits into
mainfrom
codex/add-loot-action-indicator-for-move-cards
Open

Add loot-progress punctuation to normal piece move-card indicator#10
jmegner wants to merge 2 commits into
mainfrom
codex/add-loot-action-indicator-for-move-cards

Conversation

@jmegner

@jmegner jmegner commented May 24, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Improve clarity of the small move-card indicator above normal player pieces by showing how many loot actions remain until the next full move card.

Description

  • Append a : when a normal player is 1 loot action away and a . when 2 loot actions away to the rounded-down move-card count in getLivePieceIndicators via a new getNormalPlayerMoveCardIndicator helper in src/components/PlayArea.tsx.
  • Update the in-app help text to explain the new trailing : / . semantics in the Piece Indicators section of the same file.
  • Update the Playwright test helper logic in e2e/piece-indicator-animation.spec.ts to compute expected indicator text using the same suffix rules so e2e expectations remain aligned with the UI.

Testing

  • Attempted npm run build && npm run test, but the build step failed in this environment when wasm-pack attempted to download Binaryen/wasm-opt from GitHub.
  • Rust unit tests executed (cargo test) succeeded with 49 tests passing and 0 failures.
  • The Playwright suite initially surfaced a single failing e2e assertion for the piece-indicator animation, the e2e helper was then updated and the targeted test npx playwright test e2e/piece-indicator-animation.spec.ts passed.

Codex Task

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 24, 2026

Copy link
Copy Markdown

Deploying kdlgame with  Cloudflare Pages  Cloudflare Pages

Latest commit: ef86fa5
Status: ✅  Deploy successful!
Preview URL: https://ff6afc96.kdlgame.pages.dev
Branch Preview URL: https://codex-add-loot-action-indica.kdlgame.pages.dev

View logs

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: abeb69971c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/components/PlayArea.tsx Outdated
Comment on lines +83 to +84
const roundedThirdsProgress = ((Math.round(moveCards * 3) % 3) + 3) % 3;
const lootActionsAwayFromNextFullMoveCard = (3 - roundedThirdsProgress) % 3;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Compute loot-progress suffix from real loot increment

The new suffix logic assumes loot progress advances in exact thirds (Math.round(moveCards * 3)), but game rules use MOVE_CARDS_PER_LOOT = 11/32 (see src/KdlRust/src/core/rule_helper.rs), so the displayed :/. can be wrong for valid states. This is immediately observable at integer move-card totals (e.g. 2.0 is actually 3 loot actions away from 3.0, but the code shows no suffix), and it also mislabels high fractional states like 2.96875 (1 loot away, still shown with no suffix). As a result, the indicator text and the updated help explanation are inaccurate relative to actual gameplay math.

Useful? React with 👍 / 👎.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 24, 2026

Copy link
Copy Markdown

Deploying killdoctorluckyweb with  Cloudflare Pages  Cloudflare Pages

Latest commit: ef86fa5
Status: ✅  Deploy successful!
Preview URL: https://390124a7.killdoctorluckyweb.pages.dev
Branch Preview URL: https://codex-add-loot-action-indica.killdoctorluckyweb.pages.dev

View logs

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant