Enjoy programming more!
Kidspod is a post site which supports young programmers.
First step to join us.
Register as a member
For members

2016/05/21 18:22:57

MixJuice GET URL : kidspod.club/mj/68

神経衰弱

トランプ26枚で神経衰弱をします。連続正解で得点アップ!

SOURCE CODE

1 'シンケイスイシ゛ャク
5 CLS:CLV
10 FORI=0TO25 
20 [I]=I
30 NEXT
40 FORI=0TO25 
50 W=[I]:X=RND(26)
60 [I]=[X]:[X]=W
70 NEXT
100 FORI=0TO25
140 LC(I%6)*5+2,(I/6)*3+4:?"(#FF)(#FF)(#FF)"
150 NEXT
160 U=3:V=3
200 LCU*5+1,V*3+4:?"[":LCU*5+5,V*3+4:?"]"
210 K=INKEY():IFK=0 GOTO200
220 IFK=31 IFVPEEK(U*5+3,(V+1)*3+4)<>0 GOSUB280:V=V+1
230 IFK=30 IFVPEEK(U*5+3,(V-1)*3+4)<>0 GOSUB280:V=V-1
240 IFK=29 IFVPEEK((U+1)*5+3,V*3+4)<>0 GOSUB280:U=U+1
250 IFK=28 IFVPEEK((U-1)*5+3,V*3+4)<>0 GOSUB280:U=U-1
260 IFK=32ANDVPEEK(U*5+3,V*3+4)=255 I=V*6+U:GOSUB400
270 GOTO200
280 LCU*5+1,V*3+4:?" ":LCU*5+5,V*3+4:?" ":RETURN
300 A=[I]:C=A/13:B=A%13
310 IFC=0 ?"(#E4)";B+1
320 IFC=1 ?"(#E5)";B+1
330 RETURN
400 LCU*5+2,V*3+4:IFD=0 D=1:G=[I]:GOSUB300:E=U:F=V:RETURN
410 IFD=1 IFE=UANDF=V RETURN
420 GOSUB300:IF[I]%13=G%13 S=S+H:H=H+1:BEEP:LC0,0:?"SCORE:";S:GOSUB500ELSEPLAY"O3C16":LC15,0:?"FALSE":WAIT100:LC15,0:?"     ":H=1:GOSUB600
450 D=0:RETURN
500 WAIT100:LCE*5+2,F*3+4:?"***":LCU*5+2,V*3+4:?"***":RETURN
600 WAIT100:LCE*5+2,F*3+4:?"(#FF)(#FF)(#FF)":LCU*5+2,V*3+4:?"(#FF)(#FF)(#FF)":RETURN

COMMENT