智力拼板
本程序在CEC-Ⅰ上通过。(皮治学)
10 PR#3:PRINT:HGR 2:HCOLOR=3:HPLOT 38,48 TO 38,120 TO 135,120 TO 135,68 TO 153,68 TO 153,48 TO 38,48
20 X=1: FOR I=1 TO 4:FOR J=1 TO 6:A(J,I)=X:X=X+1:NEXT:NEXT:A$="
测试反应速度考查智力水平训练思维能力激发学习兴趣"
30 FOR I= TO 4:FOR J=1 TO 6:VTAB I+3: HTAB J*2+5: PRINT MID $(A$,A(J,I)*3-2,3): VTAB I+5:HTAB J*2+20:PRIN TMID$(A$,A(J,I)*3-2,3):NEXT:NEXT:X=7:Y=1
40 C=X:D=Y:GO SUB 50:A(C,D)=A(X,Y):A(X,Y)=0:VTAB Y+3:HTAB X*2+4:PRINT"":VTABD+3:HTABC*2+4:PRINT MID $(A$,A(C,D)*3-2,3):GOTO 40
50 PK=PEEK(-16384):IF PK<128 THEN 50
60 X=X+(PK=149AND(X<6ANDY>1 OR X<7ANDY=1))-(PK=136 AND X>1):Y=Y+(PK=138 AND Y<4ANDX<7)-(PK=139ANDY>1):IF X=CANDY=D THEN 50
70 POKE-16368,0:RETURN