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

2020/02/09 08:42:37

MixJuice GET URL : kidspod.club/mj/946

逃げろ!

縦、横にキーを動かして、プレイヤーを操作します。
捕まったら、Game Over
難しいから、敵の速さは、自分で調整してねー!

  • No registered tag exist.
  • 1
  • 1

SOURCE CODE

10 CLS:X=0:Y=0:M=31:N=23:T=0
20 K=INKEY()
30 IF K=28 X=X-1
40 IF K=29 X=X+1
50 IF K=30 Y=Y-1
60 IF K=31 Y=Y+1
70 E=M+(X>M)-(X<M)
80 F=N+(Y>N)-(Y<N)
90 IF SCR(E,N)<>1 M=E
100 IF SCR(F,M)<>1 N=F
110 LC 12,11:?”P X=“;X;
120 LC 12,12:?”   Y=“;Y;
130 LC 12,14:?”M X=“;M;
140 LC 12,15:?”   Y=“;N;
150 T=T+1:IF T%8>0 GOTO 110
160 IF X=M AND Y=N LC 10,17:?”Game Over!!”;:END
170 GOTO 20

COMMENT