ZXTape!set ? ?H? 9000(#:// call init  d2// sub line lineX lineY lineX2 lineY2 lineHue -- n h(lineHue) x lineX,lineY lineX2-lineX,lineY2-lineY  2// sub oval ovalX ovalY ovalX2 ovalY2 ovalHue -- h(ovalHue) ovalX,ovalY *ovalX2=ovalX2-ovalX:ovalY2=ovalY2-ovalY ovalX2,ovalY2, -ovalX2,-ovalY2,  ,9// sub circlefilled shapeX shapeY shapeStep shapeHue -- 6:cfX=shapeX+5:cfY=shapeY-7:lineHue=shapeHue @i=0 6 shapeStep JcfY2=cfY+i:cfY3=cfY-i TLET cfA=ACS ((cfY2-cfY)/-7) ^%cfJ=s(i+1):LET cfJ=7*SIN cfA hlineX=cfX+cfJ:lineY=cfY2 rlineX2=cfX-cfJ:lineY2=lineY |100d:// call line lineY=cfY3:lineY2=lineY 100d:// call line i  /// sub circlehollow shapeX shapeY shapeHue -- )ovalHue=shapeHue:shapeY=shapeY-2 ovalX=shapeX:ovalY=shapeY 0ovalX2=shapeX+10 :ovalY2=shapeY-10 200:// call oval & /// sub circleshaded shapeX shapeY shapeHue -- %shapeStep=2:lineHue=shapeHue oldX=shapeX:oldY=shapeY !300,:// call circlefilled shapeX=oldX:shapeY=oldY !500:// call circlehollow  .// sub circlesolid shapeX shapeY shapeHue -- shapeStep=1 oldX=shapeX:oldY=shapeY !300,:// call circlefilled shapeX=oldX:shapeY=oldY !500:// call circlehollow  L9// sub squarefilled shapeX shapeY shapeHue shapeStep -- V<sfY=shapeY-2:sfX2=shapeX+12 :lineHue=shapeHue ` i=0 12 shapeStep j sfY2=sfY-i tlineX=shapeX:lineY=sfY2 ~lineX2=sfX2:lineY2=lineY 100d:// call line i  /// sub squarehollow shapeX shapeY shapeHue -- )shapeY=shapeY-2:lineHue=shapeHue (,shX2=shapeX+12 :shY2=shapeY-12 2lineX=shapeX:lineY=shapeY <lineX2=shX2:lineY2=shapeY F100d:// call line PlineX=shX2:lineY=shapeY ZlineX2=shX2:lineY2=shY2 d100d:// call line nlineX=shX2:lineY=shY2 xlineX2=shapeX:lineY2=shY2 100d:// call line lineX=shapeX:lineY=shY2 lineX2=shapeX:lineY2=shapeY 100d:// call line  /// sub squareshaded shapeX shapeY shapeHue -- %shapeStep=2:lineHue=shapeHue oldX=shapeX:oldY=shapeY "1100L:// call squarefilled shapeX=oldX:shapeY=oldY "1300:// call squarehollow  .// sub squaresolid shapeX shapeY shapeHue -- shapeStep=1 "1100L:// call squarefilled  l;// sub trianglefilled shapeX shapeY shapeHue shapeStep -- v&tfX=shapeX+9 :lineHue=shapeHue  i=0 14 shapeStep !tfJ=(i/2):tfY2=shapeY-i tfX2=tfX+tfJ:tfX3=tfX-tfJ lineX=tfX2:lineY=tfY2 lineX2=tfX3:lineY2=tfY2 100d:// call line i  41// sub trianglehollow shapeX shapeY shapeHue -- >)shapeX=shapeX+9 :lineHue=shapeHue H*thX2=shapeX+7:thX3=shapeX-7 RthY2=shapeY-14 \lineX=shapeX:lineY=shapeY flineX2=thX2:lineY2=thY2 p100d:// call line zlineX=thX2:lineY=thY2 lineX2=thX3:lineY2=thY2 100d:// call line lineX=thX3:lineY=thY2 lineX2=shapeX:lineY2=shapeY 100d:// call line  1// sub triangleshaded shapeX shapeY shapeHue -- %shapeStep=2:lineHue=shapeHue oldX=shapeX:oldY=shapeY $1900l:// call trianglefilled $shapeX=oldX:shapeY=oldY .$21004:// call trianglehollow 8 0// sub trianglesolid shapeX shapeY shapeHue -- shapeStep=1 $1900l:// call trianglefilled  (?// sub shapePlot shapeX shapeY cardFill shapeHue cardShape -- 2DsubBase=500:cardShape=1 2640P :// goto spBreak k=(i-1)*5+1:l=(j-1)*5+1 >c$=d$(k k+4) H#d$(k k+4)=d$(l l+4) Rd$(l l+4)=c$ \i f &// sub setValidate seA seB seC -- r$ o$=" validating..." 7700:// call spinner <seI=(seA-1)*5+1:a$=t$(seI seI+4) <seI=(seB-1)*5+1:b$=t$(seI seI+4) <seI=(seC-1)*5+1:c$=t$(seI seI+4) 7700:// call spinner %r$="number":v(1)=0 7700:// call spinner #r$="fill":v(2)=0 $7700:// call spinner ."r$="hue":v(3)=0 87700:// call spinner B$r$="shape":v(4)=0 L r$="valid" V // sub setClear -- i=1 tableLength 9j=(i-1)*5+1:k=j+4:c$=t$(j k)  4100:// call cardDecode /cardSel=0 5080:// goto scNextI sel=i 3700t:// call selection t$(i*5)="0" i:// label scNextI  // sub setReplace -- o$=" dealing..." // clear selected cards  b=1 tableLength 7700:// call spinner 1t$(b*5)="0"5190F:// goto srNextB1 (sel=b 23700t:// call selection <8000@:// call cardClear Fb:// label srNextB1 P6// pack table, swap first checked and last unchecked Z"a=tableLength 2 -1 d7700:// call spinner n1t$(a*5)="1"5360:// goto srNextA2 xb=1 a-1 7700:// call spinner 1t$(b*5)="0"5350:// goto srNextB2 &sel=a:8000@:// call cardClear BsrJ=(a-1)*5+1:srK=(b-1)*5+1 c$=t$(srJ srJ+4) +t$(srJ srJ+4)=t$(srK srK+4) t$(srK srK+4)=c$  4100:// call cardDecode !sel=b:3200 :// call card 5360:// goto srNextA2 b:// label srNextB2 a:// label srNextA2 !// clear checked cards and deal "b=tableLength 1 -1 7700:// call spinner 1t$(b*5)="0"5530:// goto srNextB3 "!srJ=(b-1)*5+1 ,>b<13 numDealt7800x:// call prompt H p// sub noticeMode p$ -- z m$="notice" p$=p$+" Press R" 7800x:// call prompt  // sub quitMode --  m$="quit"  p$="Really quit? Press Y or N" 7800x:// call prompt  8// sub selectMode -- B,deckLength=0 tableLength<3 L m$="select" V$p$="Select. Press 123456789ABCDEF" `7800x:// call prompt j // sub wrongMode r$ --  m$="wrong"  p$="Wrong "+r$+", -1, Press R" 7800x:// call prompt  // sub dealMore --  3tableLength>12 6510n:// goto dmFull c=1 3 1j=numDealt*5+1:c$=d$(j j+4) (4j=tableLength*5+1:t$(j j+4)=c$ 2MnumDealt=numDealt+1:tableLength=tableLength+1:sel=tableLength < 4100:// call cardDecode F3200 :// call card Pc Z5900 :// call mainMode d n)p$="13 cards already.":// label dmFull x 6000p:// call noticeMode  // sub correctKeyPress k$ --  k$"r"  5100:// call setReplace 5900 :// call mainMode  ,// sub helpKeyPress k$ -- 6 k$"r" @4200h:// call refresh J5900 :// call mainMode T // sub mainKeyPress k$ -- &k$="h"5800:// call helpMode &k$="m"6400:// call dealMore &k$="q"6100:// call quitMode (k$="s"62008:// call selectMode  // sub noticeKeyPress k$ -- &k$="r"5900 :// call mainMode  X// sub quitKeyPress k$ -- b k$="y" l&k$="n"5900 :// call mainMode v // sub selectKeyPress k$ -- sel=-1 k$="1"sel=1 k$="2"sel=2 k$="3"sel=3 k$="4"sel=4 k$="5"sel=5 k$="6"sel=6  k$="7"sel=7 k$="8"sel=8  k$="9"sel=9 *k$="a"sel=10 4k$="b"sel=11 >k$="c"sel=12 Hk$="d"sel=13 Rk$="e"sel=14 \k$="f"sel=15 fsel=-1 psI=sel*5 z!t$(sI)="1"t$(sI-1)="0"  t$(sI)="1" 3700t:// call selection $5600:// call tableSelection Br(1)=-1 r(2)=-1 r(3)=-1 0seA=r(1):seB=r(2):seC=r(3) !4800:// call setValidate *r$="valid"7400:// goto skpPoint points=points-1 6300:// call wrongMode  *points=points+1:// label skpPoint !5700D:// call correctMode  L// sub wrongKeyPress k$ -- V k$"r" `5000:// call setClear j5900 :// call mainMode t // sub handleKeyPress k$ -- 3m$="correct"6600:// call correctKeyPress -m$="help"6700,:// call helpKeyPress -m$="main"6800:// call mainKeyPress 1m$="notice"6900:// call noticeKeyPress -m$="quit"7000X:// call quitKeyPress 1m$="select"7100:// call selectKeyPress /m$="wrong"7500L:// call wrongKeyPress  // sub spinner o$ --  p$=n$(n)+o$ (7800x:// call prompt 2$n=n+1:n=5 n=1 < x// sub prompt p$ --  h(white) 521,0;" " 21,0;p$  6// sub lineOver lineX lineY lineX2 lineY2 lineHue --  h(lineHue) 1;lineX,lineY $1;lineX2-lineX,lineY2-lineY  @// sub cardClear sel -- J3300 :// call selCoords Ti=r(1)*6+1 ^j=0 5 h#(r(2)*7)+j,i;" " rj | #(// sub init -- #2%h(4):r(10 ):s(7) #<s(1)=7:s(2)=7:s(3)=7:s(4)=6:s(5)=5:s(6)=4:s(7)=3 #F0size=480:white=4:h(white)=7 #P*blue=1:red=2:green=3 #Z3h(blue)=1:h(green)=4:h(red)=2 #d #n$r(x)=(x+.5):// round #xn$="|/-\":n=1 #&// selection to table coordinate map #%x$="001020300111213102122232404142" #;// valid combos 1*1*1 1*2*3 2*2*2 3*3*3 1*2*3 or 1 6 8 27 #"v$="100001010000000000000000001" #Mv(x)=v$(((a$(x))-480)*((b$(x))-480)*((c$(x))-480)) #0:0:h(white) #5800:// call helpMode #Ȝd$="111101112011130112101122011230113101132011330121101212012130122101222012230123101232012330131101312013130132101322013230133101332013330211102112021130212102122021230213102132021330221102212022130222102222022230223102232022330231102312023130232102322023230233102332023330311103112031130312103122031230313103132031330321103212032130322103222032230323103232032330331103312033130332103322033230333103332033330" #deckLength=81Q #!4600:// call deckShuffle #)numDealt=12 :tableLength=12 #,t$=d$(1 61=)+"000000000000000" #,i=1 12 :// mark 1-12 as dealt $d$(i*5)="1" $i $points=0 $"5800:// call helpMode $,k$=:// label mainLoop $6%k$=""9260,$:// goto mainLoop $@$7600:// call handleKeyPress $J9260,$:// goto mainLoop