\ VP-chips
\
\ $Id: VP-chips.txt,v 1.1 2000/10/25 00:32:07 kris_johnson Exp $

\ Copyright 2000
\ Kristopher D. Johnson
\ 
\ See LICENSE-JacksOrBetter for the
\ conditions under which you may
\ use, redistribute, or modify this 
\ code, or create derived works.

docneeds VP-stats

.( VP-chips... )

\ Address of player's chips
g >chips constant Chips

100 constant InitChips
InitChips Chips !

\ Address of layer's current bet
\ (Note: we currently provide no
\ way for the user to change the
\ bet, but we may in future versions)
g >bet constant Bet

5 constant InitBet
InitBet Bet !

\ Subtract Bet from Chips
: deduct-bet ( -- )
  Bet @
  dup gameBet m+!
  dup totalBet m+!
  negate Chips +!
;

\ Add given payout to Chips
: add-payout ( u -- )
  dup gamePayout m+!
  dup totalPayout m+!
  Chips +!
  Chips @ highChips @
  max highChips !
;

