1449766753


見本です。


10 SET WINDOW 0,300,300,0

clear

20 RANDOMIZE

DIM a$(1 TO 5)

DIM b$(1 TO 5)

DIM c(1 TO 5)

LET p=0

LET r=0

FOR m=1 TO 5

CHARACTER INPUT CLEAR: a$(m)

PLOT TEXT ,AT 10*m,100:a$(m)

NEXT m

FOR n=1 TO 5

100 randomize

110 LET r=1+INT(5*RND)

120 IF c(1)=r THEN GOTO 100 ELSE GOTO 130

130 IF c(2)=r THEN GOTO 100 ELSE GOTO 140

140 IF c(3)=r THEN GOTO 100 ELSE GOTO 150

150 IF c(4)=r THEN GOTO 100 ELSE GOTO 160

160 IF c(5)=r THEN GOTO 100 ELSE GOTO 170

170 LET c(n)=r

200 LET b$(n)=a$(r)

NEXT n

LET h$=b$(1)&b$(2)&b$(3)&b$(4)&b$(5)

PLOT TEXT ,AT 10,150:h$

END

1449766586

見本です。


10 CLEAR

SET WINDOW 0 , 500 , 500 , 0

20 SET TEXT FONT "Times New Roman", 20

30 SET AREA COLOR 199

PLOT AREA : 435,435 ; 435,465 ; 465,465 ; 465,435

40 SET TEXT COLOR 0

PLOT TEXT ,AT 439,455: "click"

100 RANDOMIZE

300 LET n1=1+INT(5*RND)

LET n2=6+INT(5*RND)

LET n3=11+INT(5*RND)

400 IF n1=1 THEN GOTO 1100

IF n1=2 THEN GOTO 1200

IF n1=3 THEN GOTO 1300

IF n1=4 THEN GOTO 1400

IF n1=5 THEN GOTO 1500

500 IF n2=6 THEN GOTO 2100

IF n2=7 THEN GOTO 2200

IF n2=8 THEN GOTO 2300

IF n2=9 THEN GOTO 2400

IF n2=10 THEN GOTO 2500

600 IF n3=11 THEN GOTO 3100

IF n3=12 THEN GOTO 3200

IF n3=13 THEN GOTO 3300

IF n3=14 THEN GOTO 3400

IF n3=15 THEN GOTO 3500

1100 SET AREA COLOR 185

PLOT AREA : 100,100 ; 150,340 ; 350,350 ; 330,50

PLOT AREA : 435,330 ; 435,360 ; 465,360 ; 465,330

GOTO 500

1200 SET AREA COLOR 90

PLOT AREA : 50, 100 ; 100,340 ; 350,350 ; 330,50

PLOT AREA : 435,330 ; 435,360 ; 465,360 ; 465,330

GOTO 500

1300 SET AREA COLOR 74

PLOT AREA : 50,80 ; 50,350 ; 330,330 ; 350,50

PLOT AREA : 435,330 ; 435,360 ; 465,360 ; 465,330

GOTO 500

1400 SET AREA COLOR 11

PLOT AREA : 50,50 ; 50,270 ; 320,350 ; 350,50

PLOT AREA : 435,330 ; 435,360 ; 465,360 ; 465,330

GOTO 500

1500 SET AREA COLOR 158

PLOT AREA : 50,80 ; 50,340 ; 350,350 ; 350,60

PLOT AREA : 435,330 ; 435,360 ; 465,360 ; 465,330

GOTO 500

2100 SET AREA COLOR 152

PLOT AREA : 100,60 ; 50,340 ; 350,350 ; 300,50

PLOT AREA : 435,365 ; 435,395 ; 465,395 ; 465,365

GOTO 600

2200 SET AREA COLOR 199

PLOT AREA : 100,100 ; 50,340 ; 350,330 ; 200,80

PLOT AREA : 435,365 ; 435,395 ; 465,395 ; 465,365

GOTO 600

2300 SET AREA COLOR 75

PLOT AREA : 100,100 ; 50,340 ; 320,300 ; 330,50

PLOT AREA : 435,365 ; 435,395 ; 465,395 ; 465,365

GOTO 600

2400 SET AREA COLOR 229

PLOT AREA : 100,100 ; 50,340 ; 300,300 ; 330,50

PLOT AREA : 435,365 ; 435,395 ; 465,395 ; 465,365

GOTO 600

2500 SET AREA COLOR 27

PLOT AREA : 100,100 ; 50,340 ; 350,270 ; 330,50

PLOT AREA : 435,365 ; 435,395 ; 465,395 ; 465,365

GOTO 600

3100 SET AREA COLOR 181

3130 PLOT AREA : 150,100 ; 50,340 ; 250,250 ; 330,50

PLOT AREA : 435,400 ; 435,430 ; 465,430 ; 465,400

GET POINT: x , y

3132 IF x=>435 AND x=<465 AND y=>330 AND y=<360 THEN GOTO 3150 ELSE GOTO 3133

3133 IF x=>435 AND x=<465 AND y=>370 AND y=<390 THEN GOTO 3230 ELSE GOTO 3134

3134 IF x=>435 AND x=<465 AND y=>400 AND y=<430 THEN GOTO 3330 ELSE GOTO 3135

3135 IF x=>435 AND x=<465 AND y=>435 AND y=<460 THEN GOTO 3430 ELSE GOTO 3136

3136 IF x=>435 AND x=<465 AND y=>470 AND y=<490 THEN GOTO 10 ELSE GOTO 3100

3150 LET c31=11+INT(5*RND)

IF c31=11 THEN GOTO 3150 ! lottery one more

IF c31=12 THEN GOTO 3152

IF c31=13 THEN GOTO 3153

IF c31=14 THEN GOTO 3154

IF c31=15 THEN GOTO 3155

3151 SET AREA COLOR 181

GOTO 3130

3152 SET AREA COLOR 175

GOTO 3130

3153 SET AREA COLOR 170

GOTO 3130

3154 SET AREA COLOR 88

GOTO 3130

3155 SET AREA COLOR 200

GOTO 3130

3200 SET AREA COLOR 175

3230 PLOT AREA : 50,50 ; 50,250 ; 200,200 ; 200,70

PLOT AREA : 435,400 ; 435,430 ; 465,430 ; 465,400

3250 LET c32=11+INT(5*RND)

IF c32=11 THEN GOTO 3251

IF c32=12 THEN GOTO 3250 ! lottery one more

IF c32=13 THEN GOTO 3253

IF c32=14 THEN GOTO 3254

IF c32=15 THEN GOTO 3255

3251 SET AREA COLOR 181

GOTO 3130

3252 SET AREA COLOR 175

GOTO 3130

3253 SET AREA COLOR 170

GOTO 3130

3254 SET AREA COLOR 88

GOTO 3130

3255 SET AREA COLOR 200

GOTO 3130

3300 SET AREA COLOR 170

3330 PLOT AREA : 150,100 ; 100,340 ; 300,300 ; 330,100

PLOT AREA : 435,400 ; 435,430 ; 465,430 ; 465,400

3350 LET c33=11+INT(5*RND)

IF c33=11 THEN GOTO 3351

IF c33=12 THEN GOTO 3352

IF c33=13 THEN GOTO 3350 ! lottery one more

IF c33=14 THEN GOTO 3354

IF c33=15 THEN GOTO 3355

3351 SET AREA COLOR 181

GOTO 3130

3352 SET AREA COLOR 175

GOTO 3130

3353 SET AREA COLOR 170

GOTO 3130

3354 SET AREA COLOR 88

GOTO 3130

3355 SET AREA COLOR 200

GOTO 3130

3400 SET AREA COLOR 88

3430 PLOT AREA : 50,150 ; 65,300 ; 270,270 ; 350,70

PLOT AREA : 435,400 ; 435,430 ; 465,430 ; 465,400

3450 LET c34=11+INT(5*RND)

IF c34=11 THEN GOTO 3451

IF c34=12 THEN GOTO 3452

IF c34=13 THEN GOTO 3453

IF c34=14 THEN GOTO 3450 ! lottery one more

IF c34=15 THEN GOTO 3455

3451 SET AREA COLOR 181

GOTO 3130

3452 SET AREA COLOR 175

GOTO 3130

3453 SET AREA COLOR 170

GOTO 3130

3455 SET AREA COLOR 200

GOTO 3130

3500 SET AREA COLOR 200

3530 PLOT AREA : 100,50 ; 65,300 ; 270,270

PLOT AREA : 435,400 ; 435,430 ; 465,430 ; 465,400

3550 LET c35=11+INT(5*RND)

IF c35=11 THEN GOTO 3551

IF c35=12 THEN GOTO 3552

IF c35=13 THEN GOTO 3553

IF c35=14 THEN GOTO 3554

IF c35=15 THEN GOTO 3550 ! lottery one more

3551 SET AREA COLOR 181

GOTO 3130

3552 SET AREA COLOR 175

GOTO 3130

3553 SET AREA COLOR 170

GOTO 3130

3554 SET AREA COLOR 88

GOTO 3130

3555 SET AREA COLOR 200

GOTO 3130

END

1449766451

見本です。


1 SET WINDOW 0,300,300,0

10 LET x=200

LET y=30

LET i=1

LET j=1

LET m=0

25 CLEAR

65 LET x=x+i

LET y=y+j

DRAW grid(50,50)

90 SET AREA COLOR 1

PLOT AREA: 50,50; 50,100; 150,100; 150,50

100 IF x>50 THEN GOTO 110 ELSE GOTO 200

110 IF x<150 THEN GOTO 120 ELSE GOTO 200

120 IF y>50 THEN GOTO 130 ELSE GOTO 200

130 IF y<100 THEN GOTO 140 ELSE GOTO 200

140 LET i=-i+m

150 LET j=-j

200 SET AREA COLOR 9

PLOT AREA: 0,0; 0,50; 50,50; 50,0

210 IF x>0 THEN GOTO 220 ELSE GOTO 300

220 IF x<50 THEN GOTO 230 ELSE GOTO 300

230 IF y<50 THEN GOTO 240 ELSE GOTO 300

240 IF y>0 THEN GOTO 250 ELSE GOTO 300

250 LET i=-i/2

260 LET j=-j

300 SET AREA COLOR 8

PLOT AREA: 0,150; 0,200; 150,200; 150,150

400 SET AREA COLOR 11

PLOT AREA: 0,250; 0,300; 50,300; 50,250

500 SET AREA COLOR 12

PLOT AREA: 200,50; 200,200; 250,200; 250,50

510 IF x>200 THEN GOTO 520 ELSE GOTO 600

520 IF x<250 THEN GOTO 530 ELSE GOTO 600

530 IF y<200 THEN GOTO 540 ELSE GOTO 600

540 IF y>50 THEN GOTO 550 ELSE GOTO 600

550 LET i=m

560 LET j=-j

600 SET AREA COLOR 13

PLOT AREA: 250,200; 250,250; 300,250; 300,200

700 SET AREA COLOR 14

PLOT AREA: 100,250; 100,300; 300,300; 300,250

900 SET AREA COLOR 11

985 DRAW disk WITH SCALE(8)*SHIFT(x,y)

SET AREA COLOR 3

986 DRAW disk WITH SCALE(5)*SHIFT(x,y)

987 FOR k=1 TO 300000

988 NEXT k

RANDOMIZE

LET m=RND

IF x>290 THEN LET i=-m-1

IF x<10 THEN LET i=m+1

IF y>290 THEN LET j=-m-1

IF y<10 THEN LET j=m+1

1500 GOTO 25

END

1449766131

見本です


100 SET WINDOW 0,400,400,0

FOR r=0 TO 200

SET AREA COLOR 1

PLOT AREA:0,0; 0,400;400,400;400,0

SET LINE WIDTH 5

SET LINE COLOR 4

PLOT LINES: 140,0;200,220

PLOT LINES: 73,0;200,220

PLOT LINES: 0,20;200,220

PLOT LINES: 0,105;200,220

PLOT LINES: 0,167;200,220

PLOT LINES: 0,220;200,220

PLOT LINES: 0,273;200,220

PLOT LINES: 0,335;200,220

PLOT LINES: 20,400;200,220

PLOT LINES: 96,400;200,220

PLOT LINES: 150,400;200,220

PLOT LINES: 200,400;200,220

PLOT LINES: 248,400;200,220

PLOT LINES: 303,400;200,220

PLOT LINES: 400,335;200,220

PLOT LINES: 400,273;200,220

PLOT LINES: 400,167;200,220

PLOT LINES: 400,105;200,220

PLOT LINES: 400,20;200,220

PLOT LINES: 327,0;200,220

PLOT LINES: 260,0;200,220

SET LINE COLOR 1

200 SET LINE WIDTH 440

210 DRAW circle WITH SCALE(r+145)*SHIFT(200,220)

SET LINE WIDTH 40

DRAW circle WITH SCALE(r)*SHIFT(200,220)

IF r<50 THEN LET r1=0

IF r>50 THEN LET r1=r-50

DRAW circle WITH SCALE(r1)*SHIFT(200,220)

IF r<100 THEN LET r2=0

IF r>100 THEN LET r2=r-100

DRAW circle WITH SCALE(r2)*SHIFT(200,220)

IF r<150 THEN LET r3=0

IF r>150 THEN LET r3=r-150

DRAW circle WITH SCALE(r3)*SHIFT(200,220)

IF r<200 THEN LET r4=0

IF r>200 THEN LET r4=r-200

DRAW circle WITH SCALE(r4)*SHIFT(200,220)

SET AREA COLOR 171

PLOT AREA:199,0; 199,220;201,220;201,0

SET AREA COLOR 38

DRAW disk WITH SCALE(5)*SHIFT(200,220)

FOR t=0 TO 500000

NEXT t

CLEAR

NEXT r

GOTO 100

END

1448565324


i j k l m のキーを押すと、円盤がその方向へ動く。kが中心。


10 SET WINDOW 0,400,400,0

30 CLEAR


40 CHARACTER INPUT nowait :a$


   IF a$="i" THEN  DRAW disk WITH SCALE(20)*SHIFT(200,140)

   IF a$="j" THEN  DRAW disk WITH SCALE(20)*SHIFT(140,200)

   IF a$="l" THEN  DRAW disk WITH SCALE(20)*SHIFT(260,200)

   IF a$="m" THEN  DRAW disk WITH SCALE(20)*SHIFT(200,260)

   IF a$="k" THEN  DRAW disk WITH SCALE(20)*SHIFT(200,200)


   FOR ti=0 TO 1000000

   NEXT ti


       GOTO 30


        END

1448556381


何かキーを押すと大きなアルファベットが順番に出る。


5 DIM a(5,5)
  LET  i=0

10 SET WINDOW 0,300,300,0

   CHARACTER INPUT s$

20 FOR y=1 TO 5
30    for x=1 to 5

40       READ p
50       LET  a(x,y)=p

60    NEXT x
70 NEXT y

100 FOR y=1 TO 5
110    for x=1 to 5

120       IF a(x,y)=0 THEN
             SET AREA COLOR 0
             GOTO 140
          END IF
130       IF a(x,y)=1 THEN
             SET AREA COLOR 1
             GOTO 140
          END IF

140       PLOT AREA: 50+20*x,50+20*y;70+20*x,50+20*y;70+20*x,70+20*y;50+20*x,70+20*y

150    NEXT x
160 NEXT y
170 LET  i=i+1
180 IF i=26 THEN RESTORE
190 IF i=26 THEN GOTO 5

200 GOTO 10

1010 data 0,1,1,1,0,1,0,0,0,1,1,1,1,1,1,1,0,0,0,1,1,0,0,0,1
     rem A
1020 data 1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1
     rem B
1030 DATA 1,1,1,1,1,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,1,1,1,1
     REM C
1040 DATA 1,1,1,1,0,1,0,0,1,1,1,0,0,0,1,1,0,0,1,1,1,1,1,1,0
     REM D
1050 data 1,1,1,1,1,1,0,0,0,0,1,1,1,1,0,1,0,0,0,0,1,1,1,1,1
     rem E
1060 data 1,1,1,1,1,1,0,0,0,0,1,1,1,1,0,1,0,0,0,0,1,0,0,0,0
     rem F
1070 data 1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,0,0,0,1,1,1,1,1,1
     REM G
1080 data 1,0,0,0,1,1,0,0,0,1,1,1,1,1,1,1,0,0,0,1,1,0,0,0,1
     REM H
1090 data 0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0
     rem I
1100 data 0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,1,0,1,0,0,1,1,1,0
     rem J
1110 data 1,1,0,0,1,1,1,0,1,0,1,1,1,0,0,1,1,0,1,0,1,1,0,0,1
     rem K
1120 data 1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,1,1,1,0
     REM L
1130 data 1,1,0,1,1,1,1,1,1,1,1,0,1,0,1,1,0,0,0,1,1,0,0,0,1
     rem M
1140 data 1,1,0,0,1,1,1,0,0,1,1,0,1,0,1,1,0,0,1,1,1,0,0,1,1
     REM N
1150 data 1,1,1,1,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,1,1,1,1
     REM O
1160 data 1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,0,0,0,0,1,0,0,0,0
     REM P
1170 data 1,1,1,1,1,1,0,0,0,1,1,0,1,1,1,1,0,1,0,1,1,1,1,1,1
     REM Q
1180 data 1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,0,0,1,0,1,0,0,1,1
     REM R
1190 DATA 1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1
     REM S
1195 data 1,1,1,1,1,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0
     REM T
1200 data 1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,1,1,1,1
     REM U
1210 data 1,0,0,0,1,1,0,0,0,1,0,1,0,1,0,0,1,0,1,0,0,0,1,0,0
     REM V
1220 data 1,0,1,0,1,1,0,1,0,1,1,0,1,0,1,1,0,1,0,1,0,1,0,1,0
     REM W
1230 data 1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1
     REM X
1240 data 1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0
     REM Y
1250 DATA 1,1,1,1,1,0,0,0,1,1,0,0,1,0,0,1,1,0,0,0,1,1,1,1,1
     REM Z

     END

1447353338

大小当てゲーム


100 PRINT "Hi&Lowです。"

110 PRINT "ルール説明を読みますか?"

120 PRINT "Yesなら1を、Noなら2を押してください。"

130 SET ECHO "off"

140 CHARACTER INPUT CLEAR :s$

150 IF s$="1" THEN GOTO 180

160 IF s$="2" THEN GOTO 200

170 GOTO 140

180 PRINT "それじゃぁ説明しますね。"

190 GOTO 220

200 PRINT "説明は不要ですね。"

210 GOTO 240

220 PRINT "先に出た数より後の数の方が、"

230 PRINT "多きいか小さいか当てる簡単なゲームです。"

240 PRINT "では、早速始めます。"

250 PRINT "(エンターを押してください。)"

260 CHARACTER INPUT CLEAR :m$

270 RANDOMIZE

280 LET a=INT(RND*10)+1

290 PRINT "一枚目は"

300 PRINT a

310 PRINT "です。"

320 PRINT "ではこの数より大きいですか?小さいですか?"

330 PRINT "大きければHキーを。小さければLキーを押してください。"

340 SET ECHO "off"

350 CHARACTER INPUT CLEAR :b$

360 RANDOMIZE

370 LET c=INT(RND*10)+1

380 PRINT "二枚目は"

390 PRINT c

400 PRINT "です。"

410 CHARACTER INPUT CLEAR :m$

420 IF b$="h" THEN GOTO 470

430 IF b$="l" THEN GOTO 560

440 PRINT "きちんとHかLを選んで下さい。やり直しです。"

450 CHARACTER INPUT CLEAR :m$

460 GOTO 270

470 IF a>c THEN GOTO 520

480 IF a<c THEN GOTO 500

490 IF a=c THEN GOTO 540

500 PRINT "正解!あなたの勝ちです!"

510 GOTO 590

520 PRINT "残念!あなたの負けです!"

530 GOTO 590

540 PRINT "引き分けです。"

550 GOTO 590

560 IF a>c THEN GOTO 500

570 IF a<c THEN GOTO 520

580 IF a=c THEN GOTO 540

590 PRINT "よければまた再チャレンジしてくださいね♪"

600 END

     


UFOは飛ぶ


20 SET POINT STYLE 1

30 OPTION ANGLE DEGREES

40 FOR t=0 TO 360 STEP 6

50 LET i=SIN (t)/4

60 LET j=SIN(t)/12+COS (t)/12

70 LET a=a+i

LET b=b+j

80 SET AREA COLOR 4

DRAW disk WITH SCALE(0.5)*SHIFT(-a,-b)

REM SET AREA COLOR 0

REM PLOT AREA: -a-0.5,-b;-a-0.5,-b-0.5;-a+0.5,-b-0.5;-a+0.5,b

SET AREA COLOR 4

DRAW disk WITH SCALE(0.9)*SHIFT(-a,-b-0.7)

SET AREA COLOR 0

PLOT AREA: -a-0.9,-b-0.3;-a-0.9,-b-1.6;-a+0.9,-b-1.6;-a+0.9,-b-0.3

SET AREA COLOR 6

DRAW disk WITH SCALE(0.15)*SHIFT(-a,-b+0.1)

SET AREA COLOR 4

DRAW disk WITH SCALE(0.15)*SHIFT(-a,-b-0.3)

DRAW disk WITH SCALE(0.15)*SHIFT(-a-0.3,-b-0.3)

DRAW disk WITH SCALE(0.15)*SHIFT(-a+0.3,-b-0.3)

SET AREA COLOR 5

DRAW disk WITH SCALE(0.6)*SHIFT(-a,-b-2)

SET AREA COLOR 0

PLOT AREA: -a-0.7,-b-1;-a-0.7,-b-2.2;-a+0.7,-b-2.2;-a+0.7,-b-1

SET AREA COLOR 5

PLOT AREA: -a,-b-0.6;-a-0.55,-b-2.2;-a+0.55,-b-2.2

100 FOR ti=1 TO 100000

NEXT ti

110 CLEAR

120 NEXT t

130 GOTO 10

500 END



衛星軌道


20 SET POINT STYLE 1

30 OPTION ANGLE DEGREES

40 FOR t=0 TO 360 STEP 6

50 LET x=SIN (t)

60 LET y=SIN(t)/3+COS (t)/3

70 REM PLOT POINTS: x,y

80 SET COLOR 1

DRAW disk WITH SCALE(0.1)*SHIFT(x,y)

85 DRAW circle WITH SCALE(0.5)*SHIFT(0,0)

88 REM WAIT DELAY 0.05

90 SET COLOR 0

95 IF y<0 THEN DRAW disk WITH SCALE(0.49)*SHIFT(0,0)

100 WAIT DELAY 0.4

110 CLEAR

120 NEXT t

130 GOTO 10

500 END



二つのボール


50 LET a=30

LET b=30

LET i=1

LET j=1

LET c=130

LET d=30

LET m=1

LET n=1

60 CLEAR

70 LET a=a+i

LET b=b+j

LET c=c+m

LET d=d+n

85 DRAW disk WITH SCALE(5)*SHIFT(a,b)

DRAW disk WITH SCALE(8)*SHIFT(c,d)

86 FOR k=1 TO 2000

87 NEXT k

88 DRAW disk WITH SCALE(8)*SHIFT(a,b)

DRAW disk WITH SCALE(10)*SHIFT(c,d)

89 FOR k=1 TO 2000

90 NEXT k

130 IF a<20 THEN GOTO 300

140 IF b<20 THEN GOTO 300

150 IF a>280 THEN GOTO 330

160 IF b>280 THEN GOTO 330

IF c<20 THEN GOTO 1300

IF d<20 THEN GOTO 1300

IF c>280 THEN GOTO 1330

IF d>280 THEN GOTO 1330

210 IF a=c THEN 220

220 IF c=d THEN 330

270 GOTO 60

300 LET i=INT(4*RND)

RANDOMIZE

LET j=INT(4*RND)

GOTO 60

310 LET i=INT(-4*RND)

RANDOMIZE

LET j=INT(4*RND)

GOTO 60

320 LET i=INT(4*RND)

RANDOMIZE

LET j=INT(-4*RND)

GOTO 60

330 LET i=INT(-4*RND)

RANDOMIZE

LET j=INT(-4*RND)

GOTO 60

1300 LET m=INT(4*RND)

RANDOMIZE

LET n=INT(4*RND)

GOTO 60

1310 LET m=INT(-4*RND)

RANDOMIZE

LET n=INT(4*RND)

GOTO 60

1320 LET m=INT(4*RND)

RANDOMIZE

LET n=INT(-4*RND)

GOTO 60

1330 LET m=INT(-4*RND)

RANDOMIZE

LET n=INT(-4*RND)

GOTO 60

1500 GOTO 60

END



チカチカするボール


5 SET WINDOW 0,300,0,300

1650 LET x1=INT(150*RND)

LET p1=INT(300*RND)

LET q1=INT(300*RND)

SET AREA COLOR x1

DRAW disk WITH SCALE(x1)*SHIFT(p1,q1)

1660 LET x2=INT(150*RND)

LET p2=INT(300*RND)

LET q2=INT(300*RND)

SET AREA COLOR x2

DRAW disk WITH SCALE(x2)*SHIFT(p2,q2)

1670 LET x3=INT(150*RND)

LET p3=INT(300*RND)

LET q3=INT(300*RND)

SET AREA COLOR x3

DRAW disk WITH SCALE(x3)*SHIFT(p3,q3)

1680 FOR k=1 TO 150000

NEXT k

clear

1700 GOTO 5

END

1444334381

ブロック崩しの例


5 SET WINDOW 0,300,0,300

50 LET a=30
   LET b=30
   LET i=3
   LET j=2
55 LET  ye=6
   LET  re=4
   LET  bl=3
   LET  gr=5

60 CLEAR

70 LET a=a+i
   LET b=b+j

   SET AREA COLOR ye
   PLOT AREA: 0,300;0,290;300,290;300,300

   SET AREA COLOR re
   PLOT AREA: 0,290;0,280;300,280;300,290

   SET AREA COLOR bl
   PLOT AREA: 0,280;0,270;300,270;300,280

   SET AREA COLOR gr
   PLOT AREA: 0,270;0,260;300,260;300,270

80 SET AREA COLOR "black"
   DRAW disk WITH SCALE(5)*SHIFT(a,b)

   FOR k=1 TO 7000

   NEXT k

   IF b=250 THEN GOTO 160
   IF b=270 THEN GOTO 165
   IF b=280 THEN GOTO 170
   IF b=290 THEN GOTO 175

   FOR k=1 TO 7000
   NEXT k

130 IF a<30 THEN LET  i=-i
140 IF b<30 THEN LET  j=-j
150 IF a>290 THEN LET  i=-i
    IF b>290 THEN LET  j=-j
    GOTO 200

160 LET  gr=0
    GOTO 205
165 LET  bl=0
    GOTO 205
170 LET re=0
    GOTO 205
175 LET ye=0
    GOTO 205

200 IF a>30 THEN GOTO 60
    IF b>30 THEN GOTO 60
    IF a<290 THEN GOTO 60
    IF b<260 THEN GOTO 60

205 RANDOMIZE
    LET n=INT(4*RND)

210 IF n=0 THEN LET  i=-i
220 IF n=1 THEN LET  i=i
230 IF n=2 THEN LET  j=-j
240 IF n=3 THEN LET  j=j

300 IF ye=0 THEN GOTO 500

    GOTO 60

500 END

- 1 - - 2 - - 3 - - 4 - - 5 - - 6 - - 7 - - 8 - - 9 -