主题 : 【分享】某日本人用N88-BASIC(86)写的5K俄罗斯方块程序
义务网评猿
级别: 论坛版主
UID: 50665
精华: 7
发帖: 2924
威望: 13 星
金钱: 385657 浮游币
贡献值: 8748 点
好评度: 10293 点
人气: 760 点
在线时间: 697(时)
注册时间: 2005-08-02
最后登录: 2020-12-17
楼主  发表于: 2005-08-18 23:36

【分享】某日本人用N88-BASIC(86)写的5K俄罗斯方块程序

图片:
50 TITLE1$=" 噜噜忄 噹?巼?噹?? 棊?鋷?噔噜噜"
60 TITLE2$=" 噜噔噜 ? 巸   ? ?   ? 鎺?噔噜?"
70 TITLE3$="   噜忄?? 巼? ? 巼?棊?啂?噔噜 "
80 '
90 DATA 0,1,1,1,2,1,2,2 , 1,0,2,0,1,1,1,2 , 0,1,0,2,1,2,2,2 , 0,2,1,0,1,1,1,2
100 DATA 0,1,1,1,2,1,3,1 , 2,0,2,1,2,2,2,3 , 0,1,1,1,2,1,3,1 , 2,0,2,1,2,2,2,3
110 DATA 0,2,1,2,1,1,2,1 , 0,0,0,1,1,1,1,2 , 0,2,1,2,1,1,2,1 , 0,0,0,1,1,1,1,2
120 DATA 0,1,1,1,1,2,2,2 , 2,0,2,1,1,1,1,2 , 0,1,1,1,1,2,2,2 , 2,0,2,1,1,1,1,2
130 DATA 0,1,1,1,2,1,1,2 , 1,0,1,1,1,2,2,1 , 0,2,1,2,2,2,1,1 , 0,1,1,0,1,1,1,2
140 DATA 1,1,1,2,2,1,2,2 , 1,1,1,2,2,1,2,2 , 1,1,1,2,2,1,2,2 , 1,1,1,2,2,1,2,2
150 DATA 0,2,0,1,1,1,2,1 , 1,0,1,1,1,2,2,2 , 0,2,1,2,2,2,2,1 , 0,0,1,0,1,1,1,2
160 DATA "湑晻晻晻晻晻?,"? TETLIS   ?,"殨晻晻晻晻晻?,"         "
170 DATA "淗I=SCORE晻暀","?       ?,"殨晻晻晻晻晻?,"淪CORE晻晻晻?
180 DATA "?       ?,"殨晻晻晻晻晻?,"淟EVEL慠OUND?,"?   ?   ?
190 DATA "殨晻晻悤晻晻?,"淣EXT櫆LINE暀","?   枛   ?
200 DATA "?   枤晻晻暉","?   枩SC/LI?,"?   枛   ?,"殨晻暉殨晻晻?
210 DATA "","?C)So-Miya ?,"?     Soft?,"敂敂敂敂敂敂?
220 STOP ON:ON STOP GOSUB 910:RANDOMIZE VAL(MID$(TIME$,4,2)+RIGHT$(TIME$,2))
230 SCREEN 0:CLS 3:WIDTH 40,25:CONSOLE 0,25,0,1,1:DEFINT A-Z:HI=0:HAYASA=20
240 DIM A$(20),B$(20),X(7,4,4),Y(7,4,4)
250 LOCATE ,10:COLOR 5:PRINT"   湑晻晻晻晻晻晻晻晻晻晻晻晻晻?   "
260             PRINT TITLE1$
270       COLOR 1:PRINT TITLE2$
280       COLOR 5:PRINT TITLE3$
290           PRINT "   灂晻晻晻晻晻晻晻晻晻晻晻晻晻?   ":RESTORE 90
300 FOR N=1 TO 7:FOR K=1 TO 4:FOR B=1 TO 4:READ X(N,K,B),Y(N,K,B):NEXT B,K,N
310 FOR I=0 TO 18:A$(I)="嚃       枃":NEXT I:A$(19)="嚉晝晻晝晻晝暃?
320 A$(20)="鎳噰噰噰噰噰噰?:FOR I=0 TO 18:B$(I)="77       77":NEXT I
330 B$(19)="777777777777777":B$(20)=B$(19):WHILE INKEY$<>"":WEND
340 LOCATE 13,16,0:COLOR 6:PRINT "LEVEL ?(1-9) ";:LV=VAL(INPUT$(1))
350 ON -(LV<1 OR LV>9) GOTO 340:PRINT LV:LV=HAYASA-LV
360 LOCATE 13,17,0:COLOR 4:PRINT "ROUND ?(0-9) ";:RO=VAL(INPUT$(1))
370 ON -(RO>9) GOTO 360:PRINT RO:LOCATE ,,1:ON RO+1 GOTO 400
380 FOR I=0 TO RO*2:R1=INT(RND*11+3):R2=INT(RND*RO+18-RO)
390 MID$(A$(R2),R1,1)="?:MID$(B$(R2),R1,1)="7":NEXT I
400 CLS:COLOR 7:FOR I=0 TO 20:LOCATE 14,I:PRINT A$(I):NEXT I
410 RESTORE 160:FOR I=1 TO 23:READ C$:LOCATE 0,I:PRINT C$:NEXT I
420 FOR I=0 TO 19*8 STEP 8:LINE(16*16,I)-(27*16,I),1:NEXT I
430 FOR I=16*16 TO 27*16 STEP 16:LINE(I,0)-(I,19*8),1:NEXT I
440 R1=INT(RND*7+1):R2=INT(RND*4+1):SC=0:LI=0
450 LOCATE 1,12:COLOR 7:PRINT USING "#####?####";HAYASA-LV;RO
460 NU=R1:KA=R2:R1=INT(RND*7+1):R2=INT(RND*4+1)
470 FOR I=0 TO 3:LOCATE 1,15+I:PRINT "   ":NEXT I
480 FOR I=1 TO 4:LOCATE 1+X(R1,R2,I),15+Y(R1,R2,I):COLOR R1:PRINT "?:NEXT I
490 LOCATE 3,6:COLOR 6:PRINT USING "######0";HI
500 LOCATE 3,9:COLOR 7:PRINT USING "######0";SC
510 LOCATE 7,15     :PRINT USING "#####";LI   :ON -(LI=0) GOTO 530
520 LOCATE 7,18     :PRINT USING "#####";(SC*10)/LI
530 XX=20:YY=1:TIM=0:YH=0
540 FOR I=1 TO 4:LOCATE XX+X(NU,KA,I),YY+Y(NU,KA,I):COLOR NU:PRINT "?:NEXT I
550 E=0:FOR I=1 TO 4:M$(I)=MID$(A$(YY+Y(NU,KA,I)+B),XX+X(NU,KA,I)+A-13,1)
560 E=E-(M$(I)<>" "):NEXT I:ON -(E<>0) GOTO 840
570 FOR I=1 TO 4:LOCATE XX+X(NU,KA,I),YY+Y(NU,KA,I):COLOR NU:PRINT "?:NEXT I
580 A=0:B=0:KK=0:IF TIM=LV THEN B=1:TIM=0:XH=0:YH=0:GOTO 600 ELSE B=0:TIM=TIM+1
590 P=INP(&HE0):A=(P=239)-(P=191):B=-(P=251):ON -(P=223) GOTO 660
600 FOR I=1 TO 4:M$(I)=MID$(A$(YY+Y(NU,KA+KK,I)+B),XX+X(NU,KA+KK,I)+A-13,1)
610 A=((M$(I)<>" " AND B=0)+1)*A:IF M$(I)<>" " AND B=1 THEN YH=1:B=0
620 NEXT I:ON -(A+B+KK=0) GOTO 640
630 FOR I=1 TO 4:LOCATE XX+X(NU,KA,I),YY+Y(NU,KA,I):COLOR NU:PRINT " ":NEXT I
640 XX=XX+A:YY=YY+B:KA=KA+KK:ON YH GOTO 710:GOTO 570
650 '
660 KK=(KA=4)*3-(KA<4)
665 FOR II=0 TO 500:NEXT II
670 FOR I=1 TO 4:M$(I)=MID$(A$(YY+Y(NU,KA+KK,I)+B),XX+X(NU,KA+KK,I)+A-13,1)
680 IF M$(I)<>" " THEN KK=0
690 NEXT I:XH=0:YH=0:GOTO 600
700 '
710 FOR I=1 TO 4:MID$(A$(YY+Y(NU,KA,I)+B),XX+X(NU,KA,I)+A-13,1)="?
720         MID$(B$(YY+Y(NU,KA,I)+B),XX+X(NU,KA,I)+A-13,1)=HEX$(NU)
730         LOCATE XX+X(NU,KA,I),YY+Y(NU,KA,I):COLOR NU:PRINT "?:NEXT I
740 H=0:FOR I=0 TO 3
750 IF A$(I+YY)="嚃噰噰噰噰噰嚃? THEN H=H+1:GOTO 770
760 NEXT I:LI=LI+H:SC=SC+H^2:HI=-(SC>HI)*SC-(SC<=HI)*HI:H=0:GOTO 460
770 FOR T=I+YY TO 1 STEP -1:A$(T)=A$(T-1):NEXT T:A$(0)="嚃       枃"
780 FOR T=I+YY TO 1 STEP -1:B$(T)=B$(T-1):NEXT T:B$(0)="77       77"
790 FOR J=0 TO 18:FOR T=3 TO 13
800 CO=VAL(MID$(B$(J),T,1)):IF CO=0 THEN LOCATE 13+T,J:PRINT " ":GOTO 820
810 COLOR CO:LOCATE 13+T,J:PRINT "?
820 NEXT T,J:GOTO 760
830 '
840 FOR I=0 TO 15
850 LOCATE 14,1+I:COLOR 7:PRINT "嚃       枃"
860 LOCATE 14,2+I:     PRINT "鎼晻晻晻晻晻晲?
870 LOCATE 14,3+I:COLOR 6:PRINT " GAME   OVER "
880 LOCATE 14,4+I:COLOR 7:PRINT "鋺晻晻晻晻晻晳?
890 FOR T=0 TO 50:NEXT T,I:FOR I=0 TO 2000:NEXT I:CLS 3:GOTO 250
900 '
910 LOCATE ,,1:COLOR 7:WIDTH 80:STOP OFF:END

因为程序为了加速把字体都调成了特殊字符,粘贴不上来了`干脆我`把这个连同N88BASIC DOS版做成个FDI,自己到NP2(Anex、T98Next都会过快)里去试试吧`记住要先load "tetlis.bas"`(如果用N88编译器编译那么游戏速度就算在5MHZ下还是会太快,只能用N88BASIC.EXE解释执行)
附件: n88basic+tetlis.zip (292 K) 下载次数:94
燃烧的热血。。
坚强的意志。。
造就了YKSOFT Systems
http://yksoft1.spaces.live.com
级别: 受忌讳的人
UID: 4585
精华: 0
发帖: 2334
威望: 1 星
金钱: -99 浮游币
贡献值: 1 点
好评度: 90 点
人气: 0 点
在线时间: 649(时)
注册时间: 2004-05-12
最后登录: 2007-04-22
沙发  发表于: 2005-08-18 23:39

用户被禁言,该主题自动屏蔽!
级别: 受忌讳的人
UID: 4585
精华: 0
发帖: 2334
威望: 1 星
金钱: -99 浮游币
贡献值: 1 点
好评度: 90 点
人气: 0 点
在线时间: 649(时)
注册时间: 2004-05-12
最后登录: 2007-04-22
板凳  发表于: 2005-08-19 00:05

用户被禁言,该主题自动屏蔽!