Last active
April 19, 2025 02:40
-
-
Save fu-sen/7274277 to your computer and use it in GitHub Desktop.
GIVEUP! - SHARP POCKET COMPUTER PC-G850 series BASIC https://poke-com.jimdofree.com/basic-%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%A0/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 ' GIVEUP! | SHARP POCKET COMPUTER PC-G850 series BASIC | |
2 ' Copyright (c) 1995-2006 BALLOON | FU-SEN | |
3 ' The MIT License (MIT) - https://mit.balloon.net.eu.org/#1995-2006 | |
10 H=0:RANDOMIZE | |
20 CLS :LOCATE 17,0:PRINT "SCORE" | |
30 LOCATE 17,2:PRINT "HIGH" | |
40 LOCATE 18,3:PRINT H | |
50 LINE (0,0)-(99,47),S,B | |
60 X=50:Y=24:S=0:XX=0:YY=1 | |
70 LOCATE 18,1:PRINT S:PSET (X,Y) | |
80 I$= INKEY$ | |
90 IF I$="4" OR I$=CHR$(15) LET XX=-1:YY=0 | |
100 IF I$="6" OR I$=CHR$(14) LET XX=1:YY=0 | |
110 IF I$="8" OR I$=CHR$(4) LET XX=0:YY=-1 | |
120 IF I$="2" OR I$=CHR$(5) LET XX=0:YY=1 | |
130 X=X+XX:Y=Y+YY | |
140 CX= RND 100-1 | |
150 CY= RND 48-1 | |
160 IF CY-Y<-4 OR CY-Y>4 GOTO 190 | |
170 IF CX-X<-4 OR CX-X>4 GOTO 190 | |
180 GOTO 140 | |
190 PSET (CX,CY) | |
200 IF POINT (X,Y)=1 GOTO 230 | |
210 S=S+1 | |
220 GOTO 70 | |
230 FOR I=0 TO 99 | |
240 XX= RND 100-1 | |
250 YY= RND 48-1 | |
260 LINE (X,Y)-(XX,YY) | |
270 NEXT I | |
280 IF H<S LET H=S | |
290 LOCATE 18,3:PRINT H | |
300 LOCATE 17,4:PRINT "PUSH" | |
310 LOCATE 17,5:PRINT "ANY KEY" | |
320 IF INKEY$ <>"" GOTO 320 | |
330 IF INKEY$ ="" GOTO 330 | |
340 GOTO 20 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment