Skip to content

Instantly share code, notes, and snippets.

@fu-sen
Last active February 12, 2021 12:25
Show Gist options
  • Save fu-sen/7274511 to your computer and use it in GitHub Desktop.
Save fu-sen/7274511 to your computer and use it in GitHub Desktop.
' GIVE UP! | MSX-BASIC
' Copyright (c) 1995 Keiichi Shiga (BALLOON | FU-SEN)
' The MIT License (MIT) - https://mit.balloon.net.eu.org/#1995
10 COLOR15,4,4:SCREEN5:OPEN"GRP:"AS#1
20 DEFINTA-Z:I=RND(-TIME):H=0
30 SETPAGE0,0:LINE(0,0)-(255,211),14,BF
40 LINE(20,20)-(235,191),1,BF
50 S=0:X=128:Y=106:TT=5
60 IFPOINT(X,Y)<>1GOTO180
70 PSET(X,Y),15:S=S+1
80 T=STICK(0)+STICK(1)+STICK(2)
90 R=STRIG(0)+STRIG(1)+STRIG(3)
100 G=STRIG(2)+STRIG(4)
110 IFT=0ORT>8THENT=TT
120 T=(T-R+G)MOD8
130 TT=T:X=X+(T>6)-(T=2)-(T=3)-(T=4)
140 Y=Y+(T<3)+(T=8)-(T=4)-(T=5)-(T=6)
150 XX=RND(1)*215+20:YY=RND(1)*171+20
160 IFABS(XX-X)<20ANDABS(YY-Y)<20GOTO150
170 PSET(XX,YY),14:GOTO60
180 FORI=0TO99:C=RND(1)*15
190 LINE(X,Y)-(RND(1)*255,RND(1)*211),C
200 NEXT:IFH<STHENH=S
210 DRAW"BM90,100":PRINT#1,"SCORE";S
220 DRAW"BM66,110":PRINT#1,"HI-SCORE";H
230 R=STRIG(0)+STRIG(1)+STRIG(2)
240 IFR=0GOTO230ELSE30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment