Skip to content

Video Poker: flexible bid controls - #237

Merged
mishamyte merged 1 commit into
devfrom
videopoker-bid-strategy
Jul 23, 2026
Merged

Video Poker: flexible bid controls#237
mishamyte merged 1 commit into
devfrom
videopoker-bid-strategy

Conversation

@mishamyte

Copy link
Copy Markdown
Collaborator

Closes #163

Implements the requested bid strategy controls in the betting phase:

  • Left/Right: +/-$10 as before, with the existing wraparound (Left below the minimum wraps to all-in, Right at all-in wraps to the minimum)
  • Up/Down press: double / halve the current bet
  • Up/Down hold: bet half the bank, with vibro feedback

All examples from the issue behave as specified (bank $1000 bet $10 -> Left -> $1000 -> Down -> $500; bank $3000 bet $500 -> Up -> $1000; bank $10000 -> long Down -> $5000 -> Down -> $2500).

Implementation notes:

  • Up/Down betting actions use InputTypeShort/InputTypeLong (mutually exclusive per press), so they cannot collide with each other or with the InputTypePress-based deal action of Down in the hold phase; the stray vibration on Up press in every screen is gone
  • Doubling is overflow-safe and caps at all-in, so the old Up = all-in remains reachable by doubling past half the bank
  • A clamp_bet helper enforces minbet <= bet <= bank on every mutation. This also fixes the +$10 step overshooting the bank for bets that halving makes non-multiples of $10, and a state where the betting screen could be re-entered with the bet below the table minimum after winning from a sub-minimum all-in (which would have made "halve" raise the bet)
  • Betting hint updated to <^v*> Place Bet; CHANGELOG.md added with history backfilled from git; fap_version 1.3 -> 1.4

Builds clean under ufbt (API 88.0), ufbt format applied.

🤖 Generated with Claude Code

Up/Down press doubles or halves the bet, Up/Down hold bets half the
bank; Left/Right keep their +/-$10 steps with wraparound. Doubling is
overflow-safe and caps at all-in, so the old Up = all-in remains
reachable.

A clamp_bet helper enforces minbet <= bet <= bank everywhere, fixing
the +$10 step overshooting the bank for bets that are no longer
multiples of $10 and the bet re-entering the betting screen below the
table minimum after a low-bank win.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added pack/catalog App in apps_source_code (catalog) category/games App category: games labels Jul 23, 2026
@mishamyte mishamyte self-assigned this Jul 23, 2026
@mishamyte mishamyte added this to the unlshd-090 milestone Jul 23, 2026
@mishamyte
mishamyte merged commit e0b3272 into dev Jul 23, 2026
2 checks passed
Repository owner locked as resolved and limited conversation to collaborators Jul 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

category/games App category: games pack/catalog App in apps_source_code (catalog)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Video Poker: bid strategy update

1 participant