目次

ヘッド・オン風ワンキーゲーム

概要

プログラム

1 CLS:CLV:CLP:A=~0:B=189:C=231:POKE#700,60,153,A,165,36,B,219,B,119,34,B,C,C,B,34,119,B,219,B,36,165,A,153,60,51,68,B,C,C,B,68,238:FORI=0TO31:POKE#720+I,~PEEK(#700+I):NEXT
2 B=1:M=2:FORY=1TO11:F=Y%2:P=!F*B+!!F*A:A=A&~(!!F*M):B=B|!F*M:M=M<<1:FORX=0TO15:C=3+!(1<<X&P)*43:LCX,Y:?CHR$(C):LC30-X,Y:?CHR$(C):LCX,22-Y:?CHR$(C):LC30-X,22-Y:?CHR$(C):NEXT:NEXT
3 FORI=2TO9:IFI%2LC15,I:?CHR$(0):LC15,22-I:?CHR$(0):NEXTELSELCI,11:?CHR$(0):LC30-I,11:?CHR$(0):NEXT
4 T=10:X=29:Y=2:D=1:C=299:LET[0],0,29,20,46,2,1,2,46,0,1,20,46:LCX,Y:?CHR$(224+D)
5 FORN=0TO2:O=N*4:E=([O]+!RND(9))&3:F=[O+1]:G=[O+2]:LCF,G:?CHR$([O+3])
6 H=F+(E=3)-(E=1):I=G+(E=2)-!E:Z=SCR(H,I):IFZ=3||Z&~3=228E=(E+1)&3:IFE=[O]NEXT:GOTO8ELSECONT
7 LET[O],E,H,I,(Z=46)*Z:LCH,I:?CHR$(228+E):NEXT
8 IFT>TICK()CONTELSECLT:LCX,Y:?CHR$(0):V=X:W=Y:D=(D+(INKEY()=32))&3
9 X=V+(D=3)-(D=1):Y=W+(D=2)-!D:F=SCR(X,Y):IFF=3D=(D+1)&3:CONTELSEIFF&~3=228LC11,11:?"GAME OVER":ENDELSEIFF=46S=S+1:C=C-1:BEEP
10 LCX,Y:?CHR$(224+D):LC0,0:?"SCR:";S:IF!CA=~0:WAIT60:GOTO2ELSEGOTO5

解説