Second Devvit pilot, same recipe as the dishwasher one. Poker Friday already existed on the hub as a single-player Hold’em trainer with a coach. This puts one hand of it inside a Reddit post, where the daily-puzzle habit already lives.
What It Is
A Devvit Web app on r/wanessalabsdev. A moderator creates the post from the subreddit menu and the post becomes the table: a casual home game at a $20 buy-in with 25c/50c blinds, heads-up or three or four handed, played through preflop, flop, turn and river against bots. Play money, no stakes, nothing to buy.
Opponents come from an eleven-strong roster of Friday-night regulars, each with a betting personality: one overbets everything, one plays a tight value game, one calls too much with draws. Which of them sit down is part of what the seed decides.
The Seed Is the Post
Same rule as the first pilot. derivePostSeed(postId) hashes the post ID into a 32-bit integer that feeds the hub’s own seededRandom, so every player in a thread is dealt the identical hand from the identical deck. A new post tomorrow is a new hand. Nobody can reroll, and the server stores no cards.
What the Coach Actually Computes
The coach panel reports three things, and they are not equally solid. This matters, because a poker coach that overstates its own certainty is worse than no coach.
- Outs and the rule of 2 and 4 are exact.
countOutsenumerates the unseen cards that improve your hand, andruleOf2and4converts that to the standard approximation, from the hub’s own engine - Pot odds and the breakeven percentage are arithmetic.
potOddsreturns the ratio and the equity you need for a call to be break-even, and the panel says in plain English whether the call clears it - The win equity number is an estimate, not a simulation. It is a ladder keyed on your current hand rank and your outs count: a made flush or better reads 92%, trips 84%, two pair 72%, and a drawing hand scales off the outs. No hands are dealt out, nothing is sampled, and the opponents’ ranges are not modelled. It is a rough orientation figure sitting next to two numbers that are exact
The Liar Meter
A thermometer from 5 to 95 rates how likely the active opponent is bluffing: cold is a made hand, hot is air. It reads their actual hole cards, evaluated against the board, then adjusts for their personality and how late the street is. A bot holding nothing on the river runs hot.
So it is not a read. It is the game telling you the truth about the hand and daring you to act on it, which is the honest way to teach the skill before asking anyone to do it blind. Calling down a hot opponent pays a bonus.
One Engine, Two Surfaces
Nothing about poker is reimplemented here. The webview imports cards, evaluator and odds from src/games/poker/engine/ in the hub, plus the hub’s seededRandom. Showdowns go through the same compareHands that settles kickers on the hub, and the winning five are highlighted with their hole and board contributions tagged.
| Piece | Role |
|---|---|
devvit.json | Manifest: post entrypoint, server bundle, subreddit menu item |
src/server/index.ts | Express on @devvit/web/server. Create post, /api/init, /api/submit-score |
| Devvit Redis | zAdd / zRange on lb:{postId}, so the leaderboard is scoped to the thread |
App.tsx | Leaderboard, current Reddit user, and a navigateTo link back to the hub game |
PokerFridayView.tsx | The table: roster, betting controls at half pot, coach panel, liar meter, action log |
The leaderboard ranks your ending stack in cents and shows the profit against the $20 you sat down with. Four handed, the whole table is $80, which is the ceiling on what anyone can walk away with.
Constraints
The Devvit sandbox rules are the same ones the first pilot met: no coin economy, no Supporter Pack, no external network calls, no localStorage. Anything that persists is held by Reddit. Two build bundles, Vite for the webview and esbuild into a single CJS file for the server. Three tests cover seed determinism, hand evaluation with outs, and the pot-odds maths.