Bridge Training
Bridge Core

Teaching

Teaching modes and pedagogy configuration.

Teaching Modes

The teaching mode controls which game features are active. See Game Modes for the full list of modes and their CoreConfig overrides.

Teaching Module

Access teaching logic through the engine's teaching module:

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

const engine = createBridgeEngine({ teachingMode: 'h' });

engine.teaching.mode;    // "h"
engine.teaching.variant; // "classic"

engine.teaching.areAuctionsEnabled('h', true);      // true (restricted to NT)
engine.teaching.areAuctionsEnabled('auction', false); // false (teachDummy=false disables auctions)
engine.teaching.isAuctionModeEnabled(true);           // true

engine.teaching.parseTeaching('auction'); // "auction"
engine.teaching.parseTeaching('invalid'); // null
MethodDescription
modeCurrent teaching mode (getter)
variantCurrent suit variant — "classic" or "petit-bridge" (getter)
areAuctionsEnabled(mode, teachDummy)Whether auctions are enabled for this mode
isAuctionModeEnabled(teachDummy)Whether the auction mode selector should be enabled
getValidBidSuits(mode)Returns restricted bid suits (e.g. ["NT"] for minibridge) or undefined
getVariantForMode(mode)Returns "petit-bridge" or "classic"
parseTeaching(value)Parses a string into a valid TeachingMode or null

Pedagogy Groups

Teaching modes are organized into pedagogy groups for progressive learning:

engine.teaching.PEDAGOGY_GROUP_IDS; // group identifiers
engine.teaching.PEDAGOGY_GROUPS;    // full group definitions with modes

Constants

The teaching module also exposes these constants:

ConstantDescription
AUCTIONSList of auction-related teaching modes
TEACH_MODESAll available teaching modes
TEACHING_MODE_VALUESTeaching mode string values (for validation/parsing)
DEFAULT_AUCTION_MODEDefault auction mode
DEFAULT_TEACH_DUMMYDefault teach-dummy flag value
PEDAGOGY_GROUP_IDSPedagogy group identifiers
PEDAGOGY_GROUPSFull pedagogy group definitions with their modes

On this page