\ VP-payouts
\
\ $Id: VP-payouts.txt,v 1.1 2000/10/25 00:17:43 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-zstrings

.( VP-payouts... )

\ Payouts for hands
create PayoutTable
  0 , \ Loss
  5 , \ 1Pair
  10 , \ 2Pair
  15 , \ 3OfAKind
  20 , \ Straight
  30 , \ Flush
  45 , \ FullHouse
  125 , \ 4OfAKind
  250 , \ StraightFlush
  4000 , \ RoyalFlush

: score>payout ( score -- n )
  cells PayoutTable + @ ;

create PayoutBuf
  32 chars allot

: payout>zstring ( nChips -- cadr u )
  ?dup if
    >r
    PayoutBuf 0
    z" You won " append
    r> u>zstring append
    z"  chips" append
    2dup zterm
    exit
  then
  z" You did not win"
;


