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

2015/07/01 19:29:09

MixJuice GET URL : kidspod.club/mj/11

地中探検 presented by MASAHARU

ダンブンとゲーム作り 地中探検presented by MASAHARUです。
IchigoJamに打ち込んで遊んじゃおう!
*このプログラムはIchigoJam1.2.3で動作を確認しています。

SOURCE CODE

10 CLS:X=1:Y=4:P=0:V=0:A=0:B=0:C=0:D=0:E=0:T=0
20 LOCATE12,4:?"$"
30 LOCATE18,8:?"$"
40 LOCATE4,12:?"$"
50 LOCATE21,16:?"$"
60 LOCATE0,20:?"$"
70 LOCATEX,Y:?"K"
80 LOCATE0,5:?"==============================="
90 LOCATE0,9:?"==============================="
100 LOCATE0,13:?"==============================="
110 LOCATE0,17:?"==============================="
120 LOCATE0,21:?"==============================="
130 LOCATE28,0:?"$=";P
140 LOCATE0,0:?"TIME:";T
150 K=INKEY()
160 IF K=28 IF X>0 X=X-1:LOCATEX+1,Y:?" "
170 IF K=29 IF X<30 X=X+1:LOCATEX-1,Y:?" "
180 IF K=30 LOCATEX,Y:?" ":Y=Y-4
190 IF K=31 LOCATEX,Y+1:?" "
200 IF (VPEEK(X,Y+1)!=61) Y=Y+V:V=V+1:IF V>1 V=1
210 IF X=12 IF Y=4 IF A=0 P=P+1:A=1
220 IF X=18 IF Y=8 IF B=0 P=P+1:B=1
230 IF X=4 IF Y=12 IF C=0 P=P+1:C=1
240 IF X=21 IF Y=16 IF D=0 P=P+1:D=1
250 IF X=0 IF Y=20 IF E=0 P=P+1:E=1
260 IF P=5 LOCATEX,Y:?"K":LOCATE28,0:?"$=";P:END
270 IF Y=21 END
280 LOCATEX,Y-1:?" ":WAIT 1:T=T+1:GOTO 70

COMMENT