logo

Babylon.js Market

By Lawrence

5 minutes

Fire a poker.dealRequest now and the betting engine gets ready to play. It seats the stacks, pulls antes, and opens a round. Then it stops. It walks to each NPC seat, npc0..npc2, and asks what that player wants to do. Every seat answers with nothing. PokerBetting never loaded a strategy. It waits on callbacks that no one gave it. The seats just sit there with cards in front of them. This lesson gives them brains. It gives each seat a different one.

Three enigmatic AI poker opponents seated at an emerald felt table, each a hooded silhouette or stylized card-mask emblem lit by warm table glow — one chaotic and crackling with random energy, one cool and calculating wreathed in faint probability graphs, one aggressive edged in crimson — subtle neural and radar motifs woven into the darkness behind them, casino palette of emerald, gold and crimson on near-black.

Add the three AI seats to the scene

Three seats, three personalities. Each one is tied to one NPC id:

    "SeatRandy": { "components": { "PokerAIRandy": { "seatIds": ["npc0"] } } },
    "SeatBill": { "components": { "PokerAIBill": { "seatIds": ["npc1"] } } },
    "SeatCali": { "components": { "PokerAICali": { "seatIds": ["npc2"] } } }

(The components are already in src/components/. You downloaded them in Lesson 1 with bjs download.)

Continue reading

Unlock the Full Course

Every lesson, the runnable examples, and the finished build — yours to keep.

$9one-time

Was this page helpful?

We read every note — tell us what's working and what isn't.

↑↓ NavigateEnter SelectEsc CloseCtrl+K Open Search