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

2018/09/25 21:32:11

MixJuice GET URL : kidspod.club/mj/585

ブロック崩し 改良版(BASIC 0.9.9~)

original by MASAHARU https://pcn.club/gallery/

詳細は イチゴジャム レシピ で公開しています。
「プログラムをみる」を参照して下さい。

SOURCE CODE

CLS:'

NEW

10 'Blockout improved version
20 CLS:LET X,RND(15)*2+1
21 LET Y,21:LET Z,15
25 LET M,1:LET N,-1:LET S,0
26 LET T,0:LET U,1
31 LC 0,T:? CHR$(1);
32 LC 31,T:? CHR$(1);
35 LET T,T+1:IF T<>22 GOTO 31
41 LET C,1:IF U&1 LET C,219
42 LC U,0:? CHR$(C);
45 LET U,U+1:IF U<>31 GOTO 41
50 LC X,Y:? CHR$(232);
60 LC Z-1,21
61 ? CHR$(Z==1,2,2,2,2,2);
62 ? CHR$(Z==26);
63 WAIT 5
70 IF VPEEK(X,Y-1)<>219 GOTO 75
71 LET N,1:LET S,S+1
72 LC X,Y-1:? CHR$(1);
73 LC 0,23:? "SCORE ";S;
74 IF S%17==0 LET U,1:GOTO 41
75 IF Y==1 LET N,1
80 IF X==1 LET M,1
90 IF X==30 LET M,-1
110 IF SCR(X,Y+1)==2 LET N,-1
200 IF Y==22 LC 10,23:END
210 LET K,INKEY()
220 IF (K==28)*(Z>1) LET Z,Z-1
230 IF (K==29)*(Z<26) LET Z,Z+1
231 LC X,Y:? " ";
232 LET X,X+M:LET Y,Y+N
240 GOTO 50

'OK

COMMENT