/**************************************************************************\
               $VER: Yacht-Zee, v1.50 (4-Sep-97) by Dotoran!
\**************************************************************************/
options results;signal on SYNTAX;signal on ERROR;signal on IOERR
a=sourceline(2);parse var a . ", "ver" ("vdate")" .;a=random(,,time("s"))
tr=transmit;se=sendstring;gc=getchar;gu=getuser;gs=getscratch;qu=query
a="rexxsupport.library";if ~show("l",a) then if ~addlib(a,0,-30) then exit
parse source . . fp .;df=left(fp,max(lastpos('/',fp),lastpos(':',fp)))
changewhere "Yacht-Zee "ver"!" ; gu 1 ; handle=result

randice=1   /* Which RANDOM Routine? (0=Normal, 1=More Random?)           */

gu 28 ; term=result ; a=random(,,time("s"))

if term<2 | term=3 then do ; tr "f1n8" ; sp=copies(" ",10)
    tr sp"c4***********************************************************"
    tr sp"c4*                                                         *"
    tr sp"c4*   c6You need cfIBMc6-cfANSI caColor ceGraphics c6to play cbYacht-Zeec6!   c4*"
    tr sp"c4*                                                         *"
    tr sp"c4***********************************************************"
    tr sp sp sp"   c6<c9enterc6>i1" ; exit ; end

START:
    dice="123456" ; throw.=1 ; throws.=3 ; players=1 ; play=1
    sp="[23;36H"||copies(" ",42) ; gu 1 ; player.=result
    do i=1 to 3 ; do j=1 to 13 ; gd.i.j=-1 ; end j ; end i
    up.play=6 ; dn.play=7 ; cls ; call SCREEN ; call READHIGHS
    se "[23;36Hc6Do You cdNeed cbInstructionsc6? (cayc6/cbNc6)c9: "
    gc ; a=result ; if a~="Y" then do ; tr "cbNo."sp ; signal PLAY ; end
    tr "caYes!" ; signal DOCS

PLAY:
    if up.play=0 then do ; totU.play=0 ; do k=1 to 6 ; totU.play=totU.play+gd.play.k ; end k
        tr "[11;"19+play*4"Hc5"right(totU.play,3) ; bonus.play=0 ; if totU.play>=63 then do ; bonus.play=35 ; totU.play=totU.play+35 ; end
        tr "[12;"19+play*4"Hcd"right(bonus.play,3) ; up.play=-1 ; end
    if dn.play=0 then do ; totD.play=0 ; do k=7 to 13 ; totD.play=totD.play+gd.play.k ; end k
        tr "[22;"19+play*4"Hc5"right(totD.play,3) ; dn.play=-1 ; end
    if up.play=-1 & dn.play=-1 then signal DONE
    tr "[11;50Hc6-cb"play"c6- cd"left(player.play,20)
    throw.=1 ; throws.play=3 ; call THROWDICE
PLAY1:
    se "[12;50H"right(sp,25)"[12;50Hce" ; gc ; a=result ; call CHECK
    if c2d(a)=13 then a="T" ; if c2d(a)=27 then a="Q"
    a=index("12345ABCDEFGHIJKLMTQVR",a) ; if a=0 then signal PLAY1
    if a=19 then do ; tr "Throw Dice" ; signal THROW ; end
    if a=20 then do ; tr "Quit Game"  ; signal QUIT  ; end
    if a=21 then do ; tr "View Highs" ; signal HIGHS ; end
    if a=22 then do ; tr "ReDraw"     ; signal REDRAW ; end
    if a=1  then signal TOG1 ; if a=2  then signal TOG2
    if a=3  then signal TOG3 ; if a=4  then signal TOG4
    if a=5  then signal TOG5
    if a=6  then do ; tr "Aces" ; signal ACES ; end
    if a=7  then do ; tr "Twos" ; signal TWOS ; end
    if a=8  then do ; tr "Threes" ; signal THREES ; end
    if a=9  then do ; tr "Fours" ; signal FOURS ; end
    if a=10 then do ; tr "Fives" ; signal FIVES ; end
    if a=11 then do ; tr "Sixes" ; signal SIXES ; end
    if a=12 then do ; tr "3 of a Kind" ; signal KIND3 ; end
    if a=13 then do ; tr "4 of a Kind" ; signal KIND4 ; end
    if a=14 then do ; tr "Full House" ; signal FULL ; end
    if a=15 then do ; tr "Sm. Straight" ; signal SMSTRT ; end
    if a=16 then do ; tr "Lg. Straight" ; signal LGSTRT ; end
    if a=17 then do ; tr "cfYACHT-ZEE!" ; signal YACHT ; end
    if a=18 then do ; tr "Chance" ; signal CHANCE ; end
THROW:
    if throws.play=0 then do
        tr "[23;36Hc6You are c9OUT c6of cbTHROWSc6!w1"sp ; signal PLAY1 ; end
    a=0 ; do i=1 to 5 ; a=a+throw.i ; end i ; if a=0 then do
        tr "[23;36Hc6I cdneed c6some caDICE c6to c9THROW c6first!w1"sp ; signal PLAY1 ; end
    call THROWDICE ; signal PLAY1
TOG1:
    if throws.play=0 then do
        tr "[23;36Hc6You are c9OUT c6of cbTHROWSc6!w1"sp ; signal PLAY1 ; end
    if throw.1=0 then do ; tr "c9Throw[9;38HTHROW" ; d=1 ; end
    if throw.1=1 then do ; tr "caKeep![9;38HKEEP!" ; d=0 ; end
    throw.1=d ; signal PLAY1
TOG2:
    if throws.play=0 then do
        tr "[23;36Hc6You are c9OUT c6of cbTHROWSc6!w1"sp ; signal PLAY1 ; end
    if throw.2=0 then do ; tr "c9Throw[9;46HTHROW" ; d=1 ; end
    if throw.2=1 then do ; tr "caKeep![9;46HKEEP!" ; d=0 ; end
    throw.2=d ; signal PLAY1
TOG3:
    if throws.play=0 then do
        tr "[23;36Hc6You are c9OUT c6of cbTHROWSc6!w1"sp ; signal PLAY1 ; end
    if throw.3=0 then do ; tr "c9Throw[9;54HTHROW" ; d=1 ; end
    if throw.3=1 then do ; tr "caKeep![9;54HKEEP!" ; d=0 ; end
    throw.3=d ; signal PLAY1
TOG4:
    if throws.play=0 then do
        tr "[23;36Hc6You are c9OUT c6of cbTHROWSc6!w1"sp ; signal PLAY1 ; end
    if throw.4=0 then do ; tr "c9Throw[9;62HTHROW" ; d=1 ; end
    if throw.4=1 then do ; tr "caKeep![9;62HKEEP!" ; d=0 ; end
    throw.4=d ; signal PLAY1
TOG5:
    if throws.play=0 then do
        tr "[23;36Hc6You are c9OUT c6of cbTHROWSc6!w1"sp ; signal PLAY1 ; end
    if throw.5=0 then do ; tr "c9Throw[9;70HTHROW" ; d=1 ; end
    if throw.5=1 then do ; tr "caKeep![9;70HKEEP!" ; d=0 ; end
    throw.5=d ; signal PLAY1
ACES:
    if gd.play.1~=-1 then do
        tr "[23;36Hc6Your ceAces c6are c9already cbfilled c6in!w1"sp ; signal PLAY1 ; end
    tot=0 ; do k=1 to 5 ; if dice.k=1 then tot=tot+1 ; end k
    se "[23;36Hc6Use cb`ca"tot"cb' c6for your ceAcesc6? (caYc6/cbnc6)c9: "
    gc ; a=result ; if a="N" then do ; tr "cbNo."sp ; signal PLAY1 ; end
    tr "caYes"sp ; gd.play.1=tot ; tr "ce[4;"19+play*4"H"right(tot,3)
    up.play=up.play-1 ; signal PLAY
TWOS:
    if gd.play.2~=-1 then do
        tr "[23;36Hc6Your ceTwos c6are c9already cbfilled cdin!w1"sp ; signal PLAY1 ; end
    tot=0 ; do k=1 to 5 ; if dice.k=2 then tot=tot+2 ; end k
    se "[23;36Hc6Use cb`ca"tot"cb' c6for your ceTwosc6? (caYc6/cbnc6)c9: "
    gc ; a=result ; if a="N" then do ; tr "cbNo."sp ; signal PLAY1 ; end
    tr "caYes"sp ; gd.play.2=tot ; tr "ce[5;"19+play*4"H"right(tot,3)
    up.play=up.play-1 ; signal PLAY
THREES:
    if gd.play.3~=-1 then do
        tr "[23;36Hc6Your ceThrees c6are c9already cbfilled c6in!w1"sp ; signal PLAY1 ; end
    tot=0 ; do k=1 to 5 ; if dice.k=3 then tot=tot+3 ; end k
    se "[23;36Hc6Use cb`ca"tot"cb' c6for your ceThreesc6? (caYc6/cbnc6)c9: "
    gc ; a=result ; if a="N" then do ; tr "cbNo."sp ; signal PLAY1 ; end
    tr "caYes"sp ; gd.play.3=tot ; tr "ce[6;"19+play*4"H"right(tot,3)
    up.play=up.play-1 ; signal PLAY
FOURS:
    if gd.play.4~=-1 then do
        tr "[23;36Hc6Your ceFours c6are c9already cbfilled c6in!w1"sp ; signal PLAY1 ; end
    tot=0 ; do k=1 to 5 ; if dice.k=4 then tot=tot+4 ; end k
    se "[23;36Hc6Use cb`ca"tot"cb' c6for your ceFoursc6? (caYc6/cbnc6)c9: "
    gc ; a=result ; if a="N" then do ; tr "cbNo."sp ; signal PLAY1 ; end
    tr "caYes"sp ; gd.play.4=tot ; tr "ce[7;"19+play*4"H"right(tot,3)
    up.play=up.play-1 ; signal PLAY
FIVES:
    if gd.play.5~=-1 then do
        tr "[23;36Hc6Your ceFives c6are c9already cbfilled c6in!w1"sp ; signal PLAY1 ; end
    tot=0 ; do k=1 to 5 ; if dice.k=5 then tot=tot+5 ; end k
    se "[23;36Hc6Use cb`ca"tot"cb' c6for your ceFivesc6? (caYc6/cbnc6)c9: "
    gc ; a=result ; if a="N" then do ; tr "cbNo."sp ; signal PLAY1 ; end
    tr "caYes"sp ; gd.play.5=tot ; tr "ce[8;"19+play*4"H"right(tot,3)
    up.play=up.play-1 ; signal PLAY
SIXES:
    if gd.play.6~=-1 then do
        tr "[23;36Hc6Your ceSixes c6are c9already cbfilled c6in!w1"sp ; signal PLAY1 ; end
    tot=0 ; do k=1 to 5 ; if dice.k=6 then tot=tot+6 ; end k
    se "[23;36Hc6Use cb`ca"tot"cb' c6for your ceSixesc6? (caYc6/cbnc6)c9: "
    gc ; a=result ; if a="N" then do ; tr "cbNo."sp ; signal PLAY1 ; end
    tr "caYes"sp ; gd.play.6=tot ; tr "ce[9;"19+play*4"H"right(tot,3)
    up.play=up.play-1 ; signal PLAY
KIND3:
    if gd.play.7~=-1 then do
        tr "[23;36Hc6Your ce3 of a Kind c6is c9already cbfilled c6in!w1"sp ; signal PLAY1 ; end
    c.=0 ; do k=1 to 5 ; a=dice.k ; c.a=c.a+1 ; end k ; bad=1
    do k=1 to 6 ; if c.k>=3 then bad=0 ; end k ; if bad=1 then do
    tr "[23;36Hc6You don't c9HAVE c6a ce3 of a Kindc6!w1"sp ; end
    tot=0 ; if bad=0 then do k=1 to 5 ; tot=tot+dice.k ; end k
    se "[23;36Hc6Use cb`ca"tot"cb' c6for your ce3 of a Kindc6? (caYc6/cbnc6)c9: "
    gc ; a=result ; if a="N" then do ; tr "cbNo."sp ; signal PLAY1 ; end
    tr "caYes"sp ; gd.play.7=tot ; tr "ce[14;"19+play*4"H"right(tot,3)
    dn.play=dn.play-1 ; signal PLAY
KIND4:
    if gd.play.8~=-1 then do
        tr "[23;36Hc6Your ce4 of a Kind c6is c9already cbfilled c6in!w1"sp ; signal PLAY1 ; end
    c.=0 ; do k=1 to 5 ; a=dice.k ; c.a=c.a+1 ; end k ; bad=1
    do k=1 to 6 ; if c.k>=4 then bad=0 ; end k ; if bad=1 then do
    tr "[23;36Hc6You don't c9HAVE c6a ce4 of a Kindc6!w1"sp ; end
    tot=0 ; if bad=0 then do k=1 to 5 ; tot=tot+dice.k ; end k
    se "[23;36Hc6Use cb`ca"tot"cb' c6for your ce4 of a Kindc6? (caYc6/cbnc6)c9: "
    gc ; a=result ; if a="N" then do ; tr "cbNo."sp ; signal PLAY1 ; end
    tr "caYes"sp ; gd.play.8=tot ; tr "ce[15;"19+play*4"H"right(tot,3)
    dn.play=dn.play-1 ; signal PLAY
FULL:
    if gd.play.9~=-1 then do
        tr "[23;36Hc6Your ceFull House c6is c9already cbfilled c6in!w1"sp ; signal PLAY1 ; end
    c.=0 ; do k=1 to 5 ; a=dice.k ; c.a=c.a+1 ; end k ; bad=0 ; do k=1 to 6
    if c.k=2 then bad=bad+1 ; if c.k=3 then bad=bad+2 ; end k ; if bad<3 then do
    tr "[23;36Hc6You don't c9HAVE c6a ceFull Housec6!w1"sp ; end
    if bad>2 then do ; tot=25 ; se "[23;36HcaFill c6in your ceFull House c6now? (caYc6/cbnc6)c9: " ; end
    else do ; tot=0 ; se "[23;36Hc6Use cb`ca0cb' c6for your ceFull Housec6? (caYc6/cbnc6)c9: " ; end
    gc ; a=result ; if a="N" then do ; tr "cbNo."sp ; signal PLAY1 ; end
    tr "caYes"sp ; gd.play.9=tot ; tr "ce[16;"19+play*4"H"right(tot,3)
    dn.play=dn.play-1 ; signal PLAY
SMSTRT:
    if gd.play.10~=-1 then do
        tr "[23;36Hc6Your ceSm. Straight c6is c9already cbfilled c6in!w1"sp ; signal PLAY1 ; end
    c.=0 ; do k=1 to 5 ; a=dice.k ; c.a=c.a+1 ; end k ; bad=1
    if c.1>0 & c.2>0 & c.3>0 & c.4>0 then bad=0
    if c.2>0 & c.3>0 & c.4>0 & c.5>0 then bad=0
    if c.3>0 & c.4>0 & c.5>0 & c.6>0 then bad=0 ; if bad=1 then do
    tr "[23;36Hc6You don't c9HAVE c6a ceSm. Straightc6!w1"sp ; end
    if bad=0 then do ; tot=30 ; se "[23;36HcaFill c6in your ceSm. Straight c6now? (caYc6/cbnc6)c9: " ; end
    else do ; tot=0 ; se "[23;36Hc6Use cb`ca0cb' c6for your ceSm. Straightc6? (caYc6/cbnc6)c9: " ; end
    gc ; a=result ; if a="N" then do ; tr "cbNo."sp ; signal PLAY1 ; end
    tr "caYes"sp ; gd.play.10=tot ; tr "ce[17;"19+play*4"H"right(tot,3)
    dn.play=dn.play-1 ; signal PLAY
LGSTRT:
    if gd.play.11~=-1 then do
        tr "[23;36Hc6Your ceLg. Straight c6is c9already cbfilled c6in!w1"sp ; signal PLAY1 ; end
    c.=0 ; do k=1 to 5 ; a=dice.k ; c.a=c.a+1 ; end k ; bad=1
    if c.1=1 & c.2=1 & c.3=1 & c.4=1 & c.5=1 then bad=0
    if c.2=1 & c.3=1 & c.4=1 & c.5=1 & c.6=1 then bad=0 ; if bad=1 then do
    tr "[23;36Hc6You don't c9HAVE c6a ceLg. Straightc6!w1"sp ; end
    if bad=0 then do ; tot=40 ; se "[23;36HcaFill c6in your ceLg. Straight c6now? (caYc6/cbnc6)c9: " ; end
    else do ; tot=0 ; se "[23;36Hc6Use cb`ca0cb' c6for your ceLg. Straightc6? (caYc6/cbnc6)c9: " ; end
    gc ; a=result ; if a="N" then do ; tr "cbNo."sp ; signal PLAY1 ; end
    tr "caYes"sp ; gd.play.11=tot ; tr "ce[18;"19+play*4"H"right(tot,3)
    dn.play=dn.play-1 ; signal PLAY
YACHT:
    if gd.play.12~=-1 then do
        tr "[23;36Hc6Your cfYACHT-ZEE! c6is c9already cbfilled c6in!w1"sp ; signal PLAY1 ; end
    c.=0 ; do k=1 to 5 ; a=dice.k ; c.a=c.a+1 ; end k ; bad=1
    do k=1 to 6 ; if c.k=5 then bad=0 ; end k ; if bad=1 then do
    tr "[23;36Hc6You don't c9HAVE c6a cfYACHT-ZEEc6!w1"sp ; end
    if bad=0 then do ; tot=50 ; se "[23;36HcaFill c6in your cfYACHT-ZEE! c6now? (caYc6/cbnc6)c9: " ; end
    else do ; tot=0 ; se "[23;36Hc6Use cb`ca0cb' c6for your cfYACHT-ZEEc6? (caYc6/cbnc6)c9: " ; end
    gc ; a=result ; if a="N" then do ; tr "cbNo."sp ; signal PLAY1 ; end
    tr "caYes"sp ; gd.play.12=tot ; tr "ce[19;"19+play*4"H"right(tot,3)
    dn.play=dn.play-1 ; signal PLAY
CHANCE:
    if gd.play.13~=-1 then do
        tr "[23;36Hc6Your ceChance c6is c9already cbfilled c6in!w1"sp ; signal PLAY1 ; end
    tot=0 ; do k=1 to 5 ; tot=tot+dice.k ; end k
    se "[23;36Hc6Use cb`ca"tot"cb' c6for your ceChancec6? (caYc6/cbnc6)c9: "
    gc ; a=result ; if a="N" then do ; tr "cbNo."sp ; signal PLAY1 ; end
    tr "c6Yes"sp ; gd.play.13=tot ; tr "ce[20;"19+play*4"H"right(tot,3)
    dn.play=dn.play-1 ; signal PLAY
DONE:
    totG.play=totU.play+totD.play ; tr "[23;"19+play*4"Hcd"right(totG.play,3)
    call CHECKHIGHS ; se "[23;36HcbGame ceOverc9; c6Want to cfPlay cbAgainc6? (caYc6/cbnc6)c9: "
    gc ; a=result ; if a="N" then do ; tr "cbNo." ; exit ; end
    tr "caYes!"sp;play=play+1;if play>3 then play=1;do i=1 to 13;gd.play.i=-1;end i
    throw.=1 ; throws.=3 ; up.play=6 ; dn.play=7 ; call READHIGHS
    tr "[11;50Hc6-cb"play"c6- cd"left(player.play,20)"[22;69Hc9"throws.play
  signal PLAY1

THROWDICE:
    if randice=1 & throws.play=3 then do ; a=random(1,6) ; b=6-a
        dice=right(dice,a)left(dice,b) ; end
    se "[1;37m" ; do i=1 to 5 ; if throw.i=0 then iterate i
        do j=1 to 4 ; dice.i=substr(dice,random(1,6),1)
            col=29+(i*8) ; call DICE ; end j ; end i
    throws.play=throws.play-1 ; tr "[22;69Hc9"throws.play
    tr "[9;38HcaKEEP!   KEEP!   KEEP!   KEEP!   KEEP!" ; throw.=0
  return

HIGHS:
    tr "[14;35H[41m     [33mYacht-Zee Top Five Highest Scores     [40m"
    tr "[15;35Hcd       "left(hiwho.1"ce",28,".")"ca"left(hiwhat.1,10)
    tr "[16;35Hc5       "left(hiwho.2"c6",28,".")"c2"left(hiwhat.2,10)
    tr "[17;35Hcd       "left(hiwho.3"ce",28,".")"ca"left(hiwhat.3,10)
    tr "[18;35Hc5       "left(hiwho.4"c6",28,".")"c2"left(hiwhat.4,10)
    tr "[19;35Hcd       "left(hiwho.5"ce",28,".")"ca"left(hiwhat.5,10)
    tr "[20;35Hc5       "left(hiwho.6"ce",28,".")"c2"left(hiwhat.6,10)
    se "[23;36Hc6Press cfANY KEY c6to continue...g1"sp
    tr "[14;35H[44m      [1;33mMenu of Available Play Commands      [34;40m"
    tr "[15;34H³[7C cbR c6: caReDraw the Game Screen.        cc³"
    tr "[16;34H³[6C[33m1[0;36m-[1;33m5 [0;36m: [32mToggle KEEP!/THROW Status.[5C[1;34m³"
    tr "[17;34H³[33m<CR> [0;36mor [1;33mT [0;36m: [1;32mThrow/ReThrow the Dice.[8C[34m³"
    tr "[18;34H³[6C[33mA[0;36m-[1;33mM [0;36m: [32mPlace Throw On Score Card.[5C[1;34m³"
    tr "[19;34H³ [33mESC [0;36mor [1;33mQ [0;36m: [1;32mQuit & Forfeit Game Now.[7C[34m³"
    tr "[20;34H³[7C[33m V [0;36m: [32mView Top 5 Highest Scores.[5C[1;34m³"
  signal PLAY1

READHIGHS:
    if ~exists(df"Yacht-Zee.Highs") then do
        call open(f1,df"Yacht-Zee.Highs","w")
            do i=1 to 6 ; call writeln(f1,"No One Yet|0|x") ; end i
        call close(f1) ; end
    call open(f1,df"Yacht-Zee.Highs","r") ; do i=1 to 6
        hi.i=readln(f1) ; parse var hi.i hiwho.i"|"hiwhat.i"|"junk ; end i
    call close(f1);if hi.6="" then do;hiwho.6="No One Yet";hiwhat.6=0;end
  return

CHECKHIGHS:
    if totG.play>hiwhat.6 then do ; hiwhat.6=totG.play ; hiwho.6=handle
        se "[23;36Hc6A cbNEW ceHigh Scorec6..." ; do i=1 to 5
        if hiwhat.6>hiwhat.i then do
            ts=hiwhat.i ; th=hiwho.i ; hiwhat.i=hiwhat.6 ; hiwho.i=hiwho.6
            hiwhat.6=ts ; hiwho.6=th ; end ; end i
    se "cbSaving..." ; call open(f1,df"Yacht-Zee.Highs","w")
    do i=1 to 6 ; call writeln(f1,hiwho.i"|"hiwhat.i"|x") ; end i
    call close(f1) ; tr sp ; end
  return

REDRAW:;call SCREEN
  do i=1 to 3;do j=1 to 13;row=j+3;if row>=10 then row=row+4
    gd=gd.i.j;if gd=-1 then gd="";tr "["row";"19+i*4"Hce"right(gd,3);end j
    if up.i=-1 then do;tr "[11;"19+i*4"Hc5"right(totU.i,3)
      tr "[12;"19+i*4"Hcd"right(bonus.i,3);end
    if dn.i=-1 then tr "[22;"19+i*4"Hc5"right(totD.i,3)
    if up.i=-1&dn.i=-1 then tr "[23;"19+i*4"Hcd"right(totG.i,3)
  end i;se "cf";do i=1 to 5;throw.i=1;col=29+(i*8);call DICE;throw.i=0;end i
  tr "[11;50Hc6-cb"play"c6- cd"left(player.play,20)"[22;69Hc9"throws.play
 signal PLAY1

DICE:
    if throw.i=0 then return
    lab="DICE"dice.i ; signal (lab)
DICE1:
    tr "[4;"col"HÛÛÛÛÛÛÛ[5;"col"HÛÛÛßÛÛÛ[6;"col"HÛÛÛÛÛÛÛ[7;"col"Hßßßßßßß"
  return
DICE2:
    tr "[4;"col"HÛßÛÛÛÛÛ[5;"col"HÛÛÛÛÛÛÛ[6;"col"HÛÛÛÛÛßÛ[7;"col"Hßßßßßßß"
  return
DICE3:
    tr "[4;"col"HÛßÛÛÛÛÛ[5;"col"HÛÛÛßÛÛÛ[6;"col"HÛÛÛÛÛßÛ[7;"col"Hßßßßßßß"
  return
DICE4:
    tr "[4;"col"HÛßÛÛÛßÛ[5;"col"HÛÛÛÛÛÛÛ[6;"col"HÛßÛÛÛßÛ[7;"col"Hßßßßßßß"
  return
DICE5:
    tr "[4;"col"HÛßÛÛÛßÛ[5;"col"HÛÛÛßÛÛÛ[6;"col"HÛßÛÛÛßÛ[7;"col"Hßßßßßßß"
  return
DICE6:
    tr "[4;"col"HÛßÛÛÛßÛ[5;"col"HÛßÛÛÛßÛ[6;"col"HÛßÛÛÛßÛ[7;"col"Hßßßßßßß"
  return

SCREEN:
    tr "f1@4[1;34mÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿"
    tr "³   [35mYacht-Zee "ver"  [34m³[0;36m-[1;33m1[0;36m-[1;34m³[0;36m-[1;33m2[0;36m-[1;34m³[0;36m-[1;33m3[0;36m-[1;34m³   [0;36mWritten by [1;35mDotoran [0;36mof [1;35mFrontiers BBS!    [34m³"
    tr "ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÅÄÄÄÅÄÄÄÅÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´"
    tr "³    [0;32mAces [36m([32mNeed  3[36m)[1;34m³[33mA[34m³   ³   ³   ³  [37mÛßÛÛÛßÛ ÛßÛÛÛßÛ ÛßÛÛÛßÛ ÛßÛÛÛßÛ ÛßÛÛÛßÛ  [34m³"
    tr "³    [32mTwos [0;36m([1;32mNeed  6[0;36m)[1;34m³[33mB[34m³   ³   ³   ³  [37mÛÛÛßÛÛÛ ÛÛÛßÛÛÛ ÛÛÛßÛÛÛ ÛÛÛßÛÛÛ ÛÛÛßÛÛÛ  [34m³"
    tr "³  [0;32mThrees [36m([32mNeed  9[36m)[1;34m³[33mC[34m³   ³   ³   ³  [37mÛßÛÛÛßÛ ÛßÛÛÛßÛ ÛßÛÛÛßÛ ÛßÛÛÛßÛ ÛßÛÛÛßÛ  [34m³"
    tr "³   [32mFours [0;36m([1;32mNeed 12[0;36m)[1;34m³[33mD[34m³   ³   ³   ³  [37mßßßßßßß ßßßßßßß ßßßßßßß ßßßßßßß ßßßßßßß  [34m³"
    tr "³   [0;32mFives [36m([32mNeed 15[36m)[1;34m³[33mE[34m³   ³   ³   ³    [0;36m-[1;33m1[0;36m-[5C-[1;33m2[0;36m-[5C-[1;33m3[0;36m-[5C-[1;33m4[0;36m-[5C-[1;33m5[0;36m-    [1;34m³"
    tr "³   [32mSixes [0;36m([1;32mNeed 18[0;36m)[1;34m³[33mF[34m³   ³   ³   ³   [32mKEEP!   KEEP!   KEEP!   KEEP!   KEEP!   [34m³"
    tr "ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÅÄÄÄÅÄÄÄÅÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´"
    tr "³   [0;35mUpper Card Total [1;34m³   ³   ³   ³ [0;36mWhich Player[1;31m:[29C[34m³"
    tr "³ [35mBonus if Total [0;36m>[1;35m63 [34m³   ³   ³   ³ [0;36mPlay Command[1;31m:[29C[34m³"
    tr "ÆÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑÍØÍÍÍØÍÍÍØÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍµ"
    tr "³  [0;32m3 of a Kind [36m([32m??[36m)[1;34m³[33mG[34m³   ³   ³   ³[44m      [33mMenu of Available Play Commands      [34;40m³"
    tr "³  [32m4 of a Kind [0;36m([1;32m??[0;36m)[1;34m³[33mH[34m³   ³   ³   ³        cbR c6: caReDraw the Game Screen.        cc³"
    tr "³   [0;32mFull House [36m([32m25[36m)[1;34m³[33mI[34m³   ³   ³   ³[6C[33m1[0;36m-[1;33m5 [0;36m: [32mToggle KEEP!/THROW Status.[5C[1;34m³"
    tr "³ [32mSm. Straight [0;36m([1;32m30[0;36m)[1;34m³[33mJ[34m³   ³   ³   ³[33m<CR> [0;36mor [1;33mT [0;36m: [1;32mThrow/ReThrow the Dice.[8C[34m³"
    tr "³ [0;32mLg. Straight [36m([32m40[36m)[1;34m³[33mK[34m³   ³   ³   ³[6C[33mA[0;36m-[1;33mM [0;36m: [32mPlace Throw On Score Card.[5C[1;34m³"
    tr "³    [32mYACHT-ZEE [0;36m([1;32m50[0;36m)[1;34m³[33mL[34m³   ³   ³   ³ [33mESC [0;36mor [1;33mQ [0;36m: [1;32mQuit & Forfeit Game Now.[7C[34m³"
    tr "³[7C[0;32mChance [36m([32m??[36m)[1;34m³[33mM[34m³   ³   ³   ³[8C[33mV [0;36m: [32mView Top 5 Highest Scores.[5C[1;34m³"
    tr "ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÅÄÄÄÅÄÄÄÅÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´"
    tr "³   [0;35mLower Card Total [1;34m³   ³   ³   ³ [0;36mNumber of Dice Throws Remaining[1;31m:[10C[34m³"
    tr "³   [35mGAME GRAND TOTAL [34m³   ³   ³   ³[43C³"
    tr "ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ [1;1H"
  return

DOCS:
    tr "f1@4[1;34mÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿"
    tr "³   [35mYacht-Zee "ver"  [34m³[0;36m-[1;33m1[0;36m-[1;34m³[0;36m-[1;33m2[0;36m-[1;34m³[0;36m-[1;33m3[0;36m-[1;34m³   [0;36mWritten by [1;35mDotoran [0;36mof [1;35mFrontiers BBS!    [34m³"
    tr "ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´"
    tr "³ [0;36mGiven [1;32m5 [37mdice[0;36m, roll [1many combination [0;36mof these [1;37mdice [0;36mas many as [1;32m3 [0;36mtimes, while [1;34m³"
    tr "³ [0;36mtrying to fill in your [1;33mScore Card [0;36mto give you the [1;31mHighest Score [0;36mpossible.  [1;34m³"
    tr "³[76C³"
    tr "³ [0;36mOn your [1;33mScore Card[0;36m, try to [1;35mRoll [0;36mthe following[1;31m:[29C[34m³"
    tr "³[76C³"
    tr "³[9C[0;32mAces[1;31m: [0;32mAny number of [1;36m1's [0;32mfrom [1;36m0 [0;32mto [1;36m5[0;32m.  [1;33m([0;32mNeed [1;36m3  [0;32mfor [1;36m35 pt. [0;32mBONUS[1;33m)   [34m³"
    tr "³[9C[32mTwos[31m: [32mAny number of [0;36m2's [1;32mfrom [0;36m0 [1;32mto [0;36m10[1;32m. [0;33m([1;32mNeed [0;36m6  [1;32mfor [0;36m35 pt. [1;32mBONUS[0;33m)   [1;34m³"
    tr "³[7C[0;32mThrees[1;31m: [0;32mAny number of [1;36m3's [0;32mfrom [1;36m0 [0;32mto [1;36m15[0;32m. [1;33m([0;32mNeed [1;36m9  [0;32mfor [1;36m35 pt. [0;32mBONUS[1;33m)   [34m³"
    tr "³[8C[32mFours[31m: [32mAny number of [0;36m4's [1;32mfrom [0;36m0 [1;32mto [0;36m20[1;32m. [0;33m([1;32mNeed [0;36m12 [1;32mfor [0;36m35 pt. [1;32mBONUS[0;33m)   [1;34m³"
    tr "³[8C[0;32mFives[1;31m: [0;32mAny number of [1;36m5's [0;32mfrom [1;36m0 [0;32mto [1;36m25[0;32m. [1;33m([0;32mNeed [1;36m15 [0;32mfor [1;36m35 pt. [0;32mBONUS[1;33m)   [34m³"
    tr "³[8C[32mSixes[31m: [32mAny number of [0;36m6's [1;32mfrom [0;36m0 [1;32mto [0;36m30[1;32m. [0;33m([1;32mNeed [0;36m18 [1;32mfor [0;36m35 pt. [1;32mBONUS[0;33m)   [1;34m³"
    tr "³  [0;32m3 of a Kind[1;31m: [36m3 [33m([0;32mor more[1;33m) [0;32mdice showing the [1;36mSAME [0;32mNumber. [1;33m([0;32mScore [1;36mALL [0;32mDice[1;33m)   [34m³"
    tr "³  [32m4 of a Kind[31m: [0;36m4 [33m([1;32mor more[0;33m) [1;32mdice showing the [0;36mSAME [1;32mNumber. [0;33m([1;32mScore [0;36mALL [1;32mDice[0;33m)   [1;34m³"
    tr "³   [0;32mFull House[1;31m: [36m3 [0;32mdice of [1;36mONE [0;32mNumber, [1;36m2 [0;32mdice of [1;36mANOTHER [0;32mNumber.  [1;33m([0;32mScore [1;36m25[33m)  [34m³"
    se "³ [32mSm. Straight[31m: [32mEither [0;36m1[1;32m-[0;36m2[1;32m-[0;36m3[1;32m-[0;36m4[1;32m, [0;36m2[1;32m-[0;36m3[1;32m-[0;36m4[1;32m-[0;36m5[1;32m, or [0;36m3[1;32m-[0;36m4[1;32m-[0;36m5[1;32m-[0;36m6 "
    tr "[1;32mon [0;36m4 [1;32mdice.   [0;33m([1;32mScore [0;36m30[33m)  [1;34m³"
    se "³ [0;32mLg. Straight[1;31m: [0;32mEither [1;36m1[0;32m-[1;36m2[0;32m-[1;36m3[0;32m-[1;36m4[0;32m-[1;36m5 [0;32mor [1;36m2[0;32m-[1;36m3[0;32m-[1;36m4[0;32m-[1;36m5[0;32m-[1;36m6 [0;32mshowing on [1;36m5 "
    tr "[0;32mdice. [1;33m([0;32mScore [1;36m40[33m)  [34m³"
    tr "³   [32mYACHT-ZEE![31m: [32mALL [0;36mFIVE[37m([36m5[37m) [1;32mDICE SHOWING THE [0;36mSAME [1;32mNUMBER![8C[0;33m([1;32mScore [0;36m50[33m)  [1;34m³"
    tr "³[7C[0;32mChance[1;31m: [0;32mIf you can use your Throw [1;36mNO WHERE ELSE [0;32m-- [1;33m([0;32mADD [1;36mALL 5 [0;32mDICE[1;33m)  [34m³"
    tr "³[76C³"
    tr "³ [0;36mMultiple [1;37mYacht-Zee!'s [0;36mare [1;31mnot [0;36msupported yet!  Can [1;32mYOU [0;36mmake the [1;33mTop [35m5 [33mList[0;36m? [1;34m³"
    se "ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ[0;36mtap[1;34mÄ[35menter[34mÄ[0;36mwhen[1;34mÄ[33mready[34mÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙi1"
    call SCREEN
  signal PLAY

QUIT:
    se "[23;36Hc6You careally c6want to cdQuitc6?  (cayc6/cbNc6)c9: "
    gc ; a=result ; if a="Y" then do ; tr "caYes!" ; exit ; end ; else tr "cbNo."sp
  signal PLAY1

exit
CHECK:;if ARG() & ARG(1)~="###PANIC" then return ARG(1)
  getcarrier;if result="TRUE" then if ARG() then return ARG(1);else return
  logentry "Lost Carrier!!";bufferflush;exit
SYNTAX:;ERROR:;IOERR:;e1="n1 Error: "rc" ("errortext(rc)")"
  e2="  Line: "left(sigl,4)"File:";c="`"fp", "ver"'";e2=e2" "c;tr e1;tr e2
  logentry e1;logentry e2;e=strip(translate(sourceline(sigl),"\{",""))
  do while e~="";e3="Source: "left(e,37);tr e3;logentry e3;e=substr(e,38);end
  bufferflush;exit
/**************************************************************************\
\****************************************** Frontiers BBS (716)/823-9892 **/
