\ VP-fields
\ Text for informational fields
\ 
\ $Id: VP-fields.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
docneeds VP-resources
docneeds VP-payouts
docneeds VP-scorestrings

.( VP-fields... )

\ Set the text of the three
\ informational fields
: set-fields ( zadr u zadr u zadr u -- )
  2>r 2>r
  txtTop set-label
  2r> txtMiddle set-label
  2r> txtBottom set-label
;

: TapDeal ( -- zadr u )
  z' Tap "Deal" to begin new hand' 
;

: score-zstring ( -- zadr u )
  LastScore @
  ?dup if
    score>zstring exit
  then
  zbl
;

: payout-zstring ( -- zadr u )
  LastPayout @  ?dup if
    payout>zstring exit
  then
  z" You did not win"
;

: NewGame-fields ( -- )
  zempty
  z" Welcome to JacksOrBetter"
  TapDeal
;

: BetweenHands-fields ( -- )
  score-zstring
  payout-zstring
  TapDeal
;

: Dealt-fields ( -- )
  zempty
  z' Tap the cards you want to hold'
  z' Then tap "Draw" for new cards'
;

: GameOver-fields ( -- )
    payout-zstring
    z' Game Over'
    z' Tap "New Game" to begin again'
;

