Skip to content

Add roulette bankroll calculator and update roulette pages to link to it#148

Open
shelialynn304 wants to merge 5 commits into
mainfrom
codex/create-standalone-roulette-bankroll-calculator
Open

Add roulette bankroll calculator and update roulette pages to link to it#148
shelialynn304 wants to merge 5 commits into
mainfrom
codex/create-standalone-roulette-bankroll-calculator

Conversation

@shelialynn304

Copy link
Copy Markdown
Owner

Motivation

  • Provide a dedicated, SEO-friendly roulette bankroll tool because the site was using the blackjack bankroll page as a roulette workaround and that confused users and missed a roulette-specific SEO opportunity.
  • Focus the page on bankroll pressure, bust risk, and session survival using roulette-specific odds and payouts so players can estimate exposure before betting.

Description

  • Added a new standalone page roulette-bankroll-calculator.html with the requested title, canonical (https://edgeoverluck.com/roulette-bankroll-calculator.html), meta description, shared header/footer, and site styling.
  • Implemented roulette-specific inputs for Starting bankroll, Bet size per spin, Number of spins, Wheel type (European/American), and Bet type (straight, split, street, corner, six line, dozen, column, even-money), plus validation that prevents impossible values.
  • Calculations show win probability, house edge / expected loss rate, expected loss per spin, expected session loss, bankroll units, spins until expected loss equals bankroll, a Low/Medium/High/Extreme session pressure rating, and a plain-English explanation; European (37) and American (38) pocket math and payouts follow the repo math rules.
  • Added How to and FAQ visible sections and matching HowTo and FAQPage JSON-LD blocks, a WebPage JSON-LD block, and internal links to the roulette toolkit; added light, scoped CSS and in-page vanilla JS (no frameworks).
  • Updated roulette-related pages to point to the new page instead of routing roulette-context links to the blackjack bankroll workaround: roulette.html, roulette-calculator.html, roulette-simulator.html, and roulette-strategy-simulator.html were updated to include links to roulette-bankroll-calculator.html where appropriate, while leaving legitimate blackjack links intact.
  • Files changed: roulette-bankroll-calculator.html (new), roulette.html, roulette-calculator.html, roulette-simulator.html, roulette-strategy-simulator.html.

Testing

  • Ran repository JS and math checks: node scripts/js-syntax-check.js and node scripts/math-sanity-check.js, both passed successfully.
  • Verified inline calculator script with node --check /tmp/roulette-bankroll-inline.js and ran targeted formula assertions in node to confirm house-edge and payout math matched expected values, all passing.
  • Parsed JSON-LD blocks and HTML with a quick JSON parse and html.parser checks (no syntax errors found).
  • Site audit node scripts/site-audit.js ran but reported one expected issue: the new page is not in sitemap.xml (left unchanged because sitemap edits were out of scope for the allowed files).
  • Final note: no horse-racing files were edited and no existing roulette simulator or calculator formulas were changed; the change is limited to the new page and the link updates listed above.

Codex Task

@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: 73b29a5555

ℹ️ 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".

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="robots" content="index, follow" />

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 Add the new indexable page to the sitemap

Because this new root HTML page is marked indexable and has its own canonical URL, it also needs a sitemap.xml entry. I checked the repo’s audit path by running node scripts/site-audit.js, and scripts/site-audit.js requires every non-ignored root HTML file to be mapped in the sitemap; the current commit fails with root HTML page missing from sitemap.xml: roulette-bankroll-calculator.html.

Useful? React with 👍 / 👎.

Comment thread roulette-bankroll-calculator.html Outdated
const bankroll = Number.parseFloat(document.getElementById("startingBankroll").value);
const betSize = Number.parseFloat(document.getElementById("betSize").value);
const spinsRaw = Number.parseFloat(document.getElementById("spinCount").value);
const spins = Number.parseInt(document.getElementById("spinCount").value, 10);

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 Parse the spin count with Number instead of parseInt

When a browser number input contains exponent notation such as 1e3, spinsRaw parses as the valid integer 1000, but this line turns the same field into 1, so the calculator reports expected session loss and pressure for one spin instead of 1,000. Since the validation uses spinsRaw, these inputs pass and silently produce incorrect roulette bankroll results; use the already-validated numeric value rather than parseInt here.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

@codex address that feedback

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Summary

  • Fixed the roulette bankroll calculator spin parsing by using the already parsed numeric spinsRaw value for spins, preventing exponent notation like 1e3 from being silently treated as 1 by parseInt. roulette-bankroll-calculator.htmlL474-L479
  • No formulas changed.
  • Committed the change with commit 56690d4 and created a PR titled Fix roulette bankroll spin count parsing.

Testing

  • node scripts/js-syntax-check.js
  • node scripts/math-sanity-check.js
  • node scripts/site-audit.js
  • node --check /tmp/roulette-bankroll-inline.js
  • node - <<'NODE' const input = '1e3'; const spinsRaw = Number.parseFloat(input); const spins = spinsRaw; if (!Number.isFinite(spinsRaw) || !Number.isInteger(spinsRaw) || spins <= 0) { throw new Error('exponent spin input should validate as a positive integer'); } if (spins !== 1000) { throw new Error(\expected exponent spin input to remain 1000, got ${spins}`);
    }
    NODE`

View task →

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