Bridge Training
Bridge Core

Game Modes

One section per teaching mode — each shows only the properties that differ from the base config.

Import from @workspace/bridge-core/constants.

Each game mode defines a CoreConfig that controls card counts, valid ranks, auction rules, and bid restrictions. The engine resolves the appropriate config from the teachingMode in BridgeContext.

import { createBridgeEngine } from '@workspace/bridge-core';

const engine = createBridgeEngine({ teachingMode: 'auction' });
engine.hands.config; // CoreConfig for this mode

CoreConfig

Prop

Type


Base Config

DEFAULT_CORE_CONFIG — the reference point every mode extends from.

PropertyValue
nbCardsPerHand13
validRanksA K Q J T 9 8 7 6 5 4 3 2
auctions"interactive"
validBidSuitsBID_SUITS (C D H S NT)
dummyVisibletrue
variantclassic

auction

Full interactive auction — the standard bridge experience. This is the base config with no overrides.

The contract is bid normally and displayed in the player along with the goal (number of tricks NS must make, which may differ from the number required to make the contract).

const engine = createBridgeEngine({ teachingMode: 'auction' });
engine.hands.config.nbCardsPerHand; // 13
engine.hands.config.auctions;       // "interactive"

sequence

Same as auction, except the user does not interact — the bid sequence is predefined in the editor and displayed by the system.

PropertyValue
auctions"sequence"
const engine = createBridgeEngine({ teachingMode: 'sequence' });
engine.hands.config.auctions; // "sequence"

show-trump

No auction. The trump suit set by the author is displayed to the player without the goal — e.g. "Jeu à l'atout Carreau".

PropertyValue
auctions"trump"
const engine = createBridgeEngine({ teachingMode: 'show-trump' });
engine.hands.config.auctions; // "trump"

show-trump-goal

No auction. The trump suit and the target number of tricks set by the author are displayed — e.g. "But : 10 levées à l'atout Pique".

PropertyValue
auctions"goal"
const engine = createBridgeEngine({ teachingMode: 'show-trump-goal' });
engine.hands.config.auctions; // "goal"

show-contract

Like show-trump-goal, but displays the full contract instead of just the trump suit — e.g. "Contrat : 3SA, but : 10 levées".

PropertyValue
auctions"contract"
const engine = createBridgeEngine({ teachingMode: 'show-contract' });
engine.hands.config.auctions; // "contract"

no-auction

Standard bridge deck with auctions disabled. Nothing is shown to the player (no trump, no contract, no goal). The trump suit comes from the deal's contract if one is set. The goal equals the maximum number of tricks achievable by NS on the deal (used for awarding stars).

PropertyValue
auctionsfalse
const engine = createBridgeEngine({ teachingMode: 'no-auction' });
engine.hands.config.auctions; // false

no-dummy

Same as no-auction, but the dummy hand is also hidden from the player.

PropertyValue
auctionsfalse
dummyVisiblefalse
const engine = createBridgeEngine({ teachingMode: 'no-dummy' });
engine.hands.config.auctions;     // false
engine.hands.config.dummyVisible; // false

h

Minibridge variant — No Trump only. No auction: instead, the user calculates the contract based on their cards and partner information displayed on screen (card count per suit, H points). The contract and goal are displayed in the player.

PropertyValue
validBidSuits["NT"]
const engine = createBridgeEngine({ teachingMode: 'h' });
engine.hands.config.auctions;      // "interactive"
engine.hands.config.validBidSuits; // ["NT"]

hd / hld

Same as h, but any suit is available. Partner information always shows H points (not HL or HLD).

PropertyValue
auctions"contract"
const engine = createBridgeEngine({ teachingMode: 'hd' });
engine.hands.config.auctions; // "contract"

petit-bridge

Simplified variant with a reduced 40-card deck (10 cards per hand). Ranks 2, 3, 4 are removed and auctions, contract, trump are disabled. The goal should be displayed but this is not yet implemented.

PropertyValue
nbCardsPerHand10
validRanksA K Q J T 9 8 7 6 5
auctionsfalse
variantpetit-bridge
const engine = createBridgeEngine({ teachingMode: 'petit-bridge' });
engine.hands.config.nbCardsPerHand; // 10
engine.hands.config.auctions;       // false

In petit-bridge, ranks are displayed as numbers 1–10 regardless of locale:

Standard rankAKQJT98765
Display10987654321

On this page