By Lawrence
5 minutes
5 minutes
Add Three AI Opponents
Fire a poker.dealRequest now and PokerBetting 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 — and every seat answers with nothing, because PokerBetting never loaded a strategy. It is waiting on callbacks nobody gave it. Each of those three seats needs a brain, and each gets a different one.

Add the three AI seats to the scene
Three seats, three personalities. Each one is tied to one NPC id:
(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
=