Pokernight.hex

mIRC Scripting Guest 4 Views Size: 19.18 KB Posted on: Jul 4, 26 @ 1:56 AM
  1. ; ============================================================================
  2. ; poker.hex
  3. ; Poker Night
  4.  
  5. on LOAD {
  6.   set %sb 5
  7.   set %bb 10
  8.   set %rankmap $map(A,14,K,13,Q,12,J,11,T,10,9,9,8,8,7,7,6,6,5,5,4,4,3,3,2,2)
  9.   poker_reset
  10.   sidebar add poker poker_open ♠ Play Poker
  11. }
  12.  
  13. ; Full reset to a clean lobby. Used on load AND when the table is closed, so closing a game
  14. ; terminates it completely, re-opening (even on a different network) shows a fresh lobby
  15. alias poker_reset {
  16.   set %practice 0
  17.   set %chan #game
  18.   set %hosted 0
  19.   set %ishost 0
  20.   set %bots $map()
  21.   set %seats $list()
  22.   set %name $map()
  23.   set %stack $map()
  24.   set %bet $map()
  25.   set %folded $map()
  26.   set %board $list()
  27.   set %myhole $map()
  28.   set %hole $map()
  29.   set %started 0
  30.   set %street lobby
  31.   set %pot 0
  32.   set %tocall 0
  33.   set %turn 0
  34.   set %betamount 0
  35.   set %handid 0
  36.   set %button 0
  37.   set %hostfp
  38.   set %gameover 0
  39.   set %champion
  40.   set %startstack 1000
  41.   set %winners $list()
  42.   set %winnertext
  43.   set %allin $map()
  44.   set %turnid 0            ; bumped every time the turn moves; a stale clock tick is ignored
  45.   set %actclockms 45000    ; per-turn shot-clock (ms); the host auto-checks/folds an AWOL player
  46.   set %pending $map()      ; fp->name of players who joined mid-hand; seated at the next deal
  47. }
  48.  
  49. ; ---- open / join -----------------------------------------------------------
  50. ; The sidebar entry point: just (re)draw the table. Render copes with every state
  51. ; (empty lobby, seated-and-waiting, mid-hand, showdown).
  52. alias poker_open { poker_render }
  53.  
  54. ; The user tapped Close on the table → halt the bot loop so a pending timer tick can't
  55. ; re-render and pop the table straight back open.
  56. on SIGNAL:view_closed { poker_reset }
  57.  
  58. alias poker {
  59.   ; Practice runs entirely on the local loopback (#practice is never an IRC channel).
  60.   ; A real game must actually be in the shared IRC channel so peers can exchange +AGE lines.
  61.   if (%practice == 0) { join %chan }
  62.   age.join %chan                              ; announce our +AGE identity (real: broadcast; practice: skipped)
  63.   age.send %chan join $age.me $me 1000        ; register me (local always; to peers once the host has keyed)
  64.   if (%practice == 0) { toast Joined %chan, waiting for the host to start the hand }
  65.   else { toast Joined the table - waiting for players }
  66. }
  67.  
  68. ; lobby buttons
  69. on SIGNAL:poker_join  { poker }
  70. on SIGNAL:poker_start {
  71.   if (%gameover == 1) { return }
  72.   if (%practice == 1) { poker_deal | return }
  73.   ; Real game: the host (seat 0) administers. First tap mints the shared key and invites everyone
  74.   ; who announced an identity; each peer keys itself on accept (age_ready) and re-registers over the
  75.   ; encrypted channel, so they appear seated. The host taps again to deal once players are in, which
  76.   ; avoids dealing into a channel whose peers aren't keyed yet.
  77.   poker_sethost
  78.   if (%ishost == 0) { toast Waiting for the host to start the hand | return }
  79.   if (%hosted == 0) { age.host %chan | set %hosted 1 | poker_render | toast Table keyed, players are joining. Tap Deal when ready | return }
  80.   poker_deal
  81. }
  82.  
  83. on SIGNAL:age_ready {
  84.   ; the shared table key just arrived; register at the table over the now-encrypted channel so the
  85.   ; host (and everyone) sees us seated.
  86.   if (%practice == 0) { age.send %chan join $age.me $me 1000 }
  87. }
  88.  
  89. on SIGNAL:age_msg {
  90.   ; $from = sender fp ; $1 = move type ; $2- = payload
  91.   ; Host-authoritative: the dealer runs all game logic and broadcasts state; clients render it.
  92.   set %me $age.me
  93.   if ($1 == join)      { poker_onjoin $1 $2 $3 $4 }
  94.   elseif ($1 == act)   { if (%ishost == 1) { poker_onact $1 $2 $3 } }
  95.   elseif ($1 == state) { if ($from != %me) { poker_applystate $2- } }
  96. }
  97.  
  98. ; ---- host-authoritative state sync -----------------------------------------
  99. alias poker_sethost {
  100.   set %me $age.me
  101.   set %hostfp $get(%seats, 0)
  102.   set %ishost 0
  103.   if (%practice == 1) { set %ishost 1 }
  104.   elseif (%hostfp == %me) { set %ishost 1 }
  105. }
  106.  
  107. ; ---- seat helpers: find the next seat still in the hand / able to act ----------
  108. ; A busted or folded seat is skipped. These use locals (set -l) so they never clobber
  109. ; a caller's %n/%fp/%idx while it is mid-loop.
  110. alias poker_nextin {
  111.   ; $1 = start index; returns the next index (wrapping) whose seat isn't folded/busted
  112.   set -l %n $len(%seats)
  113.   set -l %k 0
  114.   while (%k < %n) {
  115.     set -l %idx $mod($calc($1 + %k), %n)
  116.     if ($get(%folded, $get(%seats, %idx)) != 1) { return %idx }
  117.     set -l %k $calc(%k + 1)
  118.   }
  119.   return $mod($1, %n)
  120. }
  121. alias poker_nextactor {
  122.   ; $1 = start index; returns the next index (wrapping) that can still act (not folded, not all-in)
  123.   set -l %n $len(%seats)
  124.   set -l %k 0
  125.   while (%k < %n) {
  126.     set -l %idx $mod($calc($1 + %k), %n)
  127.     set -l %fp $get(%seats, %idx)
  128.     if ($get(%folded, %fp) != 1) { if ($get(%allin, %fp) != 1) { return %idx } }
  129.     set -l %k $calc(%k + 1)
  130.   }
  131.   return $mod($1, %n)
  132. }
  133.  
  134. alias poker_broadcast {
  135.   if (%ishost == 0) { return }
  136.   ; NOTE: the state is shipped as space-separated tokens, so age_msg reassembles it with
  137.   ; $2- (single spaces). $tojson emits no spaces except inside string values (names, the
  138.   ; winner line), which are single-spaced and survive the round-trip. Keep player names
  139.   ; free of runs of spaces and this stays lossless.
  140.   set %st $map()
  141.   setat %st seats %seats
  142.   setat %st names %name
  143.   setat %st stacks %stack
  144.   setat %st bets %bet
  145.   setat %st folded %folded
  146.   setat %st allin %allin
  147.   setat %st board %board
  148.   setat %st pot %pot
  149.   setat %st tocall %tocall
  150.   setat %st turn %turn
  151.   setat %st street %street
  152.   setat %st started %started
  153.   setat %st button %button
  154.   setat %st winner %winnertext
  155.   age.send %chan state $tojson(%st)
  156. }
  157.  
  158. alias poker_applystate {
  159.   set %j $1-
  160.   set %seats $list()
  161.   set %i 0
  162.   set %go 1
  163.   while (%go == 1) {
  164.     set %fp $json(%j, seats.%i)
  165.     if ($len(%fp) == 0) { set %go 0 } else { push %seats %fp | set %i $calc(%i + 1) }
  166.   }
  167.   set %board $list()
  168.   set %i 0
  169.   set %go 1
  170.   while (%go == 1) {
  171.     set %cd $json(%j, board.%i)
  172.     if ($len(%cd) == 0) { set %go 0 } else { push %board %cd | set %i $calc(%i + 1) }
  173.   }
  174.   set %name $map()
  175.   set %stack $map()
  176.   set %bet $map()
  177.   set %folded $map()
  178.   set %allin $map()
  179.   foreach %fp %seats {
  180.     setat %name %fp $json(%j, names.%fp)
  181.     setat %stack %fp $json(%j, stacks.%fp)
  182.     setat %bet %fp $json(%j, bets.%fp)
  183.     set %fd $json(%j, folded.%fp)
  184.     if (%fd == 1) { setat %folded %fp 1 }
  185.     set %ai $json(%j, allin.%fp)
  186.     if (%ai == 1) { setat %allin %fp 1 }
  187.   }
  188.   set %pot $json(%j, pot)
  189.   set %tocall $json(%j, tocall)
  190.   set %turn $json(%j, turn)
  191.   set %street $json(%j, street)
  192.   set %started $json(%j, started)
  193.   set %button $json(%j, button)
  194.   set %winnertext $json(%j, winner)
  195.   poker_sethost
  196.   poker_render
  197. }
  198.  
  199. alias poker_onjoin {
  200.   ; $2 = fp, $3 = name, $4 = stack
  201.   ; track roster as a map fp->name and an ordered list (idempotent on rejoin). A brand-new player
  202.   ; who arrives mid-hand is parked in %pending and seated at the next deal, so a join never
  203.   ; renumbers %seats or shifts the turn pointer inside a live hand.
  204.   set %newp 0
  205.   if ($has(%name,$2) == false) { set %newp 1 }
  206.   setat %name $2 $3
  207.   setat %stack $2 $4
  208.   if (%newp == 1) {
  209.     if (%started == 1) { setat %pending $2 1 }
  210.     else { push %seats $2 }
  211.   }
  212.   poker_sethost
  213.   if (%ishost == 1) { poker_broadcast }
  214.   poker_render
  215. }
  216.  
  217. ; ---- practice mode: play a full hand solo against calling-station bots --------
  218. alias poker_practice {
  219.   set %practice 1
  220.   set %bots $map()
  221.   set %chan #practice
  222.   poker
  223.   age.send %chan join bot1 Botcall 1000
  224.   setat %bots bot1 1
  225.   age.send %chan join bot2 Robofish 1000
  226.   setat %bots bot2 1
  227.   poker_deal
  228. }
  229.  
  230. ; bot turn-driver - runs on a scheduled tick (NOT synchronously) so the main thread
  231. ; is never blocked by a long cascade of bot actions; each tick acts once, the UI
  232. ; repaints, then the next action is re-scheduled by poker_onact / poker_deal below.
  233. on SIGNAL:poker_botstep {
  234.   if (%practice == 1) {
  235.     if (%started == 1) {
  236.       set %cur $get(%seats,%turn)
  237.       if ($has(%bots,%cur) == true) { poker_botbrain %cur }
  238.     }
  239.   }
  240. }
  241.  
  242. ; Arm the per-turn shot clock. Bumps %turnid so a tick scheduled for an earlier turn is ignored
  243. ; once the turn moves on. In real games the host schedules itself to auto-act if the seat to move
  244. ; goes quiet (disconnected or just away), so one absent player can never freeze the whole table.
  245. ; Bots run on their own fast driver (poker_botstep), so this only ever resolves a human who left.
  246. alias poker_armclock {
  247.   set %turnid $calc(%turnid + 1)
  248.   if (%practice == 0) { if (%ishost == 1) { timer %actclockms poker_turntimeout %turnid } }
  249. }
  250.  
  251. on SIGNAL:poker_turntimeout {
  252.   if (%ishost == 0) { return }
  253.   if (%started == 0) { return }
  254.   if ($1 != %turnid) { return }                  ; the turn already moved on; stale tick
  255.   set %cur $get(%seats,%turn)
  256.   if ($has(%bots,%cur) == true) { return }        ; bots resolve themselves
  257.   ; auto-act for the away seat: check when it costs nothing, otherwise fold. age.local injects the
  258.   ; move locally as that seat (exactly like a bot move) and the host re-broadcasts the result.
  259.   if ($calc(%tocall - $get(%bet,%cur)) <= 0) { age.local %cur act check }
  260.   else { age.local %cur act fold }
  261. }
  262.  
  263. ; A simple but believable bot: folds trash, calls/raises by hand strength, bluffs occasionally.
  264. ; Pre-flop it scores the two hole cards; post-flop it uses the made-hand category (0..7). Pot odds
  265. ; make cheap calls more tempting, and a random roll keeps it from being predictable.
  266. alias poker_botbrain {
  267.   set %bot $1
  268.   set %mybet $get(%bet,%bot)
  269.   set %need $calc(%tocall - %mybet)
  270.   if (%need < 0) { set %need 0 }
  271.   set %stk $get(%stack,%bot)
  272.   set %roll $rand(0, 99)
  273.  
  274.   ; raise target = current call level + 3 big blinds, capped at all-in
  275.   set %raiseto $calc(%tocall + $calc(%bb * 3))
  276.   set %maxto $calc(%mybet + %stk)
  277.   if (%raiseto > %maxto) { set %raiseto %maxto }
  278.  
  279.   ; a call is "cheap" when it costs a quarter of the pot or less
  280.   set %cheapthresh $calc(%pot / 4)
  281.   set %cheap 0
  282.   if (%need <= %cheapthresh) { set %cheap 1 }
  283.  
  284.   if ($len(%board) == 0) {
  285.     ; ---- pre-flop: score the two hole cards (high cards + pair/suited bonuses) ----
  286.     ; NB: split on the default (space) delimiter. A quoted " " is a literal, not a separator,
  287.     ; so $split(x, " ") would return the whole string as one element and hide the second card.
  288.     set %hc $split($get(%hole,%bot))
  289.     set %c1 $get(%hc, 0)
  290.     set %c2 $get(%hc, 1)
  291.     set %r1 $get(%rankmap, $left(%c1, 1))
  292.     set %r2 $get(%rankmap, $left(%c2, 1))
  293.     set %pf $calc(%r1 + %r2)
  294.     if (%r1 == %r2) { set %pf $calc(%pf + 12) }
  295.     if ($right(%c1, 1) == $right(%c2, 1)) { set %pf $calc(%pf + 4) }
  296.     if (%need == 0) {
  297.       if (%pf >= 24) { age.local %bot act raise %raiseto }
  298.       elseif (%pf >= 18 && %roll < 50) { age.local %bot act raise %raiseto }
  299.       elseif (%roll < 6) { age.local %bot act raise %raiseto }
  300.       else { age.local %bot act check }
  301.     } else {
  302.       if (%pf >= 26) { age.local %bot act raise %raiseto }
  303.       elseif (%pf >= 19) { age.local %bot act call }
  304.       elseif (%pf >= 14 && %cheap == 1) { age.local %bot act call }
  305.       elseif (%cheap == 1 && %roll < 30) { age.local %bot act call }
  306.       else { age.local %bot act fold }
  307.     }
  308.   } else {
  309.     ; ---- post-flop: made-hand category 0=high .. 7=quads ----
  310.     set %sc $handscore($get(%hole,%bot) $join(%board))
  311.     set %cat $int($calc(%sc / 759375))
  312.     if (%need == 0) {
  313.       if (%cat >= 3) { age.local %bot act raise %raiseto }
  314.       elseif (%cat == 2 && %roll < 75) { age.local %bot act raise %raiseto }
  315.       elseif (%cat == 1 && %roll < 35) { age.local %bot act raise %raiseto }
  316.       elseif (%roll < 8) { age.local %bot act raise %raiseto }
  317.       else { age.local %bot act check }
  318.     } else {
  319.       if (%cat >= 4) { age.local %bot act raise %raiseto }
  320.       elseif (%cat >= 2) { if (%roll < 45) { age.local %bot act raise %raiseto } else { age.local %bot act call } }
  321.       elseif (%cat == 1) { if (%cheap == 1 || %roll < 55) { age.local %bot act call } else { age.local %bot act fold } }
  322.       else {
  323.         if (%cheap == 1 && %roll < 55) { age.local %bot act call }
  324.         elseif (%roll < 10) { age.local %bot act call }
  325.         else { age.local %bot act fold }
  326.       }
  327.     }
  328.   }
  329. }
  330.  
  331. ; ---- start a hand (dealer button rotates each hand) ------------------------
  332. alias poker_deal {
  333.   poker_sethost
  334.   ; seat anyone who joined during the previous hand (parked in %pending), now that seat order and
  335.   ; the turn pointer can safely change. Guard against double-seating on a rejoin.
  336.   foreach %fp $keys(%pending) { if ($has(%seats, %fp) == false) { push %seats %fp } }
  337.   set %pending $map()
  338.   set %started 1
  339.   set %winnertext
  340.   set %board $list()
  341.   set %folded $map()
  342.   set %bet $map()
  343.   set %hole $map()
  344.   set %myhole $map()
  345.   set %street preflop
  346.   set %pot 0
  347.   set %tocall %bb
  348.   ; players with no chips are out for the hand: mark them folded so every downstream loop
  349.   ; (turn advance, showdown, live-count) skips them with no special-casing.
  350.   foreach %fp %seats { if ($get(%stack,%fp) <= 0) { setat %folded %fp 1 } }
  351.   ; move the dealer button to the next player who still has chips (first hand keeps seat 0)
  352.   if (%handid > 0) { set %button $poker_nextin($calc(%button + 1)) }
  353.   set %handid $calc(%handid + 1)
  354.   set %dealerfp $get(%seats, %button)
  355.   ; secret deck (dealer only). seed kept private; revealed at showdown to verify.
  356.   set %seed $age.rand(32)
  357.   poker_builddeck
  358.   ; deal 2 hole cards per seat; only seal to players actually in the hand
  359.   set %i 0
  360.   foreach %fp %seats {
  361.     set %c1 $get(%deck,$calc(%i * 2))
  362.     set %c2 $get(%deck,$calc(%i * 2 + 1))
  363.     if ($get(%folded,%fp) != 1) { age.seal %fp %c1 %c2 }
  364.     if (%ishost == 1) { setat %hole %fp %c1 %c2 }
  365.     set %i $calc(%i + 1)
  366.   }
  367.   ; community sits after all hole cards
  368.   set %base $calc($len(%seats) * 2)
  369.   ; post blinds relative to the button and open betting
  370.   poker_postblinds
  371.   poker_render
  372.   poker_broadcast
  373.   timer 350 poker_botstep
  374.   poker_armclock
  375. }
  376.  
  377. alias poker_builddeck {
  378.   set %deck $list()
  379.   set %keyed $list()
  380.   foreach %r $list(2,3,4,5,6,7,8,9,T,J,Q,K,A) {
  381.     foreach %s $list(c,d,h,s) {
  382.       ; keyed shuffle: sort cards by a PRF of (seed, card) - a verifiable permutation
  383.       push %keyed $age.sha(%seed%r%s)~%r%s
  384.     }
  385.   }
  386.   set %keyed $sort(%keyed)
  387.   foreach %k %keyed {
  388.     set %card $get($split(%k,~),1)
  389.     push %deck %card
  390.   }
  391. }
  392.  
  393. alias poker_postblinds {
  394.   set %contrib $map()
  395.   set %acted $map()
  396.   set %allin $map()
  397.   ; how many players are actually in this hand (chips at the start)
  398.   set %inhand 0
  399.   foreach %fp %seats { if ($get(%folded,%fp) != 1) { set %inhand $calc(%inhand + 1) } }
  400.   ; blind seats relative to the button, skipping busted players
  401.   if (%inhand < 3) {
  402.     ; heads-up: the button posts the small blind and acts first pre-flop
  403.     set %sbi %button
  404.     set %bbi $poker_nextin($calc(%button + 1))
  405.   } else {
  406.     set %sbi $poker_nextin($calc(%button + 1))
  407.     set %bbi $poker_nextin($calc(%sbi + 1))
  408.   }
  409.   set %sbfp $get(%seats, %sbi)
  410.   set %bbfp $get(%seats, %bbi)
  411.   ; post blinds, clamped to stack (a short stack goes all-in on its blind)
  412.   set %sbamt %sb
  413.   if (%sbamt > $get(%stack,%sbfp)) { set %sbamt $get(%stack,%sbfp) }
  414.   set %bbamt %bb
  415.   if (%bbamt > $get(%stack,%bbfp)) { set %bbamt $get(%stack,%bbfp) }
  416.   setat %bet %sbfp %sbamt
  417.   setat %bet %bbfp %bbamt
  418.   setat %contrib %sbfp %sbamt
  419.   setat %contrib %bbfp %bbamt
  420.   setat %stack %sbfp $calc($get(%stack,%sbfp) - %sbamt)
  421.   setat %stack %bbfp $calc($get(%stack,%bbfp) - %bbamt)
  422.   if ($get(%stack,%sbfp) <= 0) { setat %allin %sbfp 1 }
  423.   if ($get(%stack,%bbfp) <= 0) { setat %allin %bbfp 1 }
  424.   set %pot $calc(%sbamt + %bbamt)
  425.   set %tocall %bb
  426.   ; first to act pre-flop = next player who can act after the big blind (heads-up: the SB/button)
  427.   if (%inhand < 3) { set %turn %sbi }
  428.   else { set %turn $poker_nextactor($calc(%bbi + 1)) }
  429. }
  430.  
  431. ; our sealed hole cards arrive here
  432. on SIGNAL:age_deal {
  433.   ; $data = "<c1> <c2>"
  434.   setat %myhole me $data
  435.   poker_render
  436. }
  437.  
  438. ; ---- betting ---------------------------------------------------------------
  439. on SIGNAL:poker_fold  { age.send %chan act fold }
  440. on SIGNAL:poker_call  { age.send %chan act call }
  441. on SIGNAL:poker_raise { age.send %chan act raise %betamount }
  442. on SIGNAL:poker_min   { set %betamount %bb | poker_render }
  443. on SIGNAL:poker_q     { set %betamount $int($calc(%pot / 4)) | poker_render }
  444. on SIGNAL:poker_h     { set %betamount $int($calc(%pot / 2)) | poker_render }
  445. on SIGNAL:poker_pot   { set %betamount %pot | poker_render }
  446. on SIGNAL:poker_t     { set %betamount $int($calc(%pot * 3 / 4)) | poker_render }
  447. on SIGNAL:poker_allin { age.send %chan act allin }
  448.  
  449. alias poker_onact {
  450.   ; Drop stale / double-tapped / out-of-turn actions. The view only shows action buttons on
  451.   ; your turn, but taps can still race the async re-render; without this guard a second tap
  452.   ; re-applies a move for a seat that has already acted, corrupting stacks/pot and the turn
  453.   ; pointer (the "mash the buttons" crash). Only the seat whose turn it is may act.
  454.   if (%started == 0) { halt }
  455.   if ($from != $get(%seats,%turn)) { halt }
  456.   ; $from acted: $2 = fold|check|call|raise ; $3 = raise-to amount
  457.   set %fp $from
  458.   if ($2 == fold) {
  459.     setat %folded %fp 1
  460.     setat %acted %fp 1
  461.   }
  462.   elseif ($2 == raise) {
  463.     set %need $calc($3 - $get(%bet,%fp))
  464.     if (%need < 0) { set %need 0 }     ; a raise-to below our current bet isn't a raise; never move chips backwards
  465.     set %put %need
  466.     if (%put > $get(%stack,%fp)) { set %put $get(%stack,%fp) }   ; clamp to stack (short all-in)
  467.     setat %bet %fp $calc($get(%bet,%fp) + %put)
  468.     setat %stack %fp $calc($get(%stack,%fp) - %put)
  469.     setat %contrib %fp $calc($get(%contrib,%fp) + %put)
  470.     set %pot $calc(%pot + %put)
  471.     set %tocall $get(%bet,%fp)
  472.     set %acted $map()            ; a genuine raise re-opens the action for everyone
  473.     setat %acted %fp 1
  474.     if ($get(%stack,%fp) == 0) { setat %allin %fp 1 }
  475.   }
  476.   elseif ($2 == allin) {
  477.     ; host-authoritative all-in: commit the seat's entire remaining stack, clamped by the host so
  478.     ; it works even if the client's local %bet/%stack are stale. A raise (new bet above %tocall)
  479.     ; re-opens the action for everyone; an all-in that only calls/undercalls does not.
  480.     set %put $get(%stack,%fp)
  481.     setat %bet %fp $calc($get(%bet,%fp) + %put)
  482.     setat %stack %fp 0
  483.     setat %contrib %fp $calc($get(%contrib,%fp) + %put)
  484.     set %pot $calc(%pot + %put)
  485.     if ($get(%bet,%fp) > %tocall) { set %tocall $get(%bet,%fp) | set %acted $map() }
  486.     setat %acted %fp 1
  487.     setat %allin %fp 1
  488.   }
  489.   else {
  490.     ; call or check (call short-stack = all-in for the rest)
  491.     set %need $calc(%tocall - $get(%bet,%fp))
  492.     if (%need < 0) { set %need 0 }
  493.     set %put %need
  494.     if (%put > $get(%stack,%fp)) { set %put $get(%stack,%fp) }
  495.     setat %bet %fp $calc($get(%bet,%fp) + %put)
  496.     setat %stack %fp $calc($get(%stack,%fp) - %put)
  497.     setat %contrib %fp $calc($get(%contrib,%fp) + %put)
  498.     set %pot $calc(%pot + %put)
  499.     setat %acted %fp 1
  500.     if ($get(%stack,%fp) == 0) { setat %allin %fp 1 }
  501.   }
  502.   poker_advance
  503.   poker_render
  504.   poker_broadcast
  505.   timer 350 poker_botstep
  506.   poker_ar

Raw Paste

Comments 0
Login to post a comment.
  • No comments yet. Be the first.
Login to post a comment. Login or Register
We use cookies. To comply with GDPR in the EU and the UK we have to show you these.

We use cookies and similar technologies to keep this website functional (including spam protection via Google reCAPTCHA or Cloudflare Turnstile), and — with your consent — to measure usage and show ads. See Privacy.