Skip to main content

exactVillainLeapfrogOutCounts

Deck indices where the next board card leapfrogs villain ahead of hero, and where hero's strength improves vs the current board.

exactVillainLeapfrogOutCounts(heroHoleCards: CardInput, boardCards: CardInput, knownDead?: CardInput): VillainLeapfrogOutCountsResult

See Packed card input and Card notation for deck indices 0..51.

Import

const poker = require('poker-calculations');

ESM (Node):

import { createRequire } from 'module';
const require = createRequire(import.meta.url);
const poker = require('poker-calculations');

When to use

You want anti-out and hero-improve card lists on a flop or turn — for study overlays, blocker charts, or exact out counting without Monte Carlo.

How to use

const poker = require('poker-calculations');
const { deckIndexToCardString } = require('poker-calculations/encode');

const { leapfrogDeckIndices, heroImproveDeckIndices } =
poker.exactVillainLeapfrogOutCounts(['Ah', 'Kh'], ['Qh', 'Jh', '2c']);

const leapfrogCards = leapfrogDeckIndices.map(deckIndexToCardString);
console.log('Leapfrog outs:', leapfrogCards);
console.log('Hero improve count:', heroImproveDeckIndices.length);

boardCards must have 3 or 4 cards.

Return type

VillainLeapfrogOutCountsResult.

See also

exactHeroRunoutVulnerability · equityDeltaIfCardRemoved · Card notation