Traducciones de esta página:

Herramientas de usuario

Herramientas del sitio


es:tetris

TETRIS

Ficha

Tetris_p1.jpg

Autor ???????
Computadora Amstrad PCW 8256 / 8512 / 9512
Año ????
Género Estrategia
Controles Teclado
Lenguajes Inglés
Estado Preservado

Capturas

Tetris_basic_screenshot01.png Tetris_basic_screenshot02.png Tetris_basic_screenshot03.png Tetris_basic_screenshot04.png

Descripción

El objetivo del juego es colocar las diversas fichas con formas diferentes evitando la acumulación de huecos. Como caen, puedes mover bloques a izquierda o derecha o incluso rotarlas con las teclas de cursor. Cuando se completa una capa, ésta desaparece y se añadirán puntos. Esto a la vez, nos ayuda para acceder a espacios dejados anteriormente en el juego. Si llenamos el marco entero entonces el juego terminará. La ventana inferior derecha da una vista previa del bloque que caerá a continuación del que tenemos en pantalla. Cuanto mejores resultados obtengamos, más rápido se ejecutará el juego, y la puntuación será mejor también. Podremos presionar exit en cualquier momento del juego para abandonar el mismo.

Para comenzar el juego veremos un indicador que parpadea donde se elige el nivel de juego (1 a 9). Los puntuajes se actualizan continuamente en la pantalla. Podremos guardar el record en el disco junto con el nombre del jugador y posteriormente se mostrará en la pantalla en los juegos futuros con la posición reajustada.

Listado

  • Listado 1 - TETRIS.BAS
10 DIM b(8,10):h!=HIMEM:MEMORY &HBFFE:FOR x=&HC070 TO &HC098:READ pk:POKE x,pk:NEXT x
20 DATA 243,62,129,211,241,62,130,211,242,175,95,103,22,184,58,153,192,111,41,41
30 DATA 41,25,17,154,192,235,1,8,0,237,176,62,133,211,241,62,134,211,242,251,201
40 CHAR=248:count=8:ch=CHAR:WHILE char<count+ch:POKE &HC099,(char):FOR r=1 TO 8:READ b(r,ct):POKE &HC099+r,(b(r,ct))
50 NEXT:cl=&HC070:CALL cl:char=char+1:WEND:MEMORY h!:CHAIN "TETRIS.scr
60 DATA 0,0,0,0,0,0,0,128, 17,68,17,68,17,68,17,68
70 DATA 170,85,170,85,170,85,170,85, 204,204,204,204,204,204,204,204, 255,0,255,0,255,0,255,0
80 DATA  204,51,204,51,204,51,204,51
90 DATA 102,204,153,51,102,204,153,51, 51,153,204,102,51,153,204,102
  • Listado 2 - TETRIS.SCR
10 OPTION RUN
12 h!=HIMEM:MEMORY,10000
20 ee$=CHR$(27):con$=ee$+"e":cof$=ee$+"f":PRINT cof$
30 ul$=ee$+"r":nul$=ee$+"u"
40 DEF FNat$(x,y)=ee$+"Y"+CHR$(32+x)+CHR$(32+y)
50 DEF FNd$(h,g)=STRING$(h,249+g)
60 c$=ee$+"E":PRINT c$ ee$ "0"
70 rev$=ee$+"p":rof$=ee$+"q"
80 RANDOMIZE(PEEK(64504!))
90 DEFINT a-z:DEFSTR a,b,c,e,k
100 er=CHR$(248)+" "
110 DIM z(22,15),E(19),A(19),B(19),L(20),N$(12),s(12)
120 FOR x=0 TO 20:FOR y=0 TO 11 STEP 11:z(x,y)=1:NEXT:NEXT:FOR y=0 TO 11:z(21,y)=1:NEXT
130 FOR i=0 TO 6:x(i)=i:NEXT
140 TOP=1:GOSUB 450
150 n=(RND*19):IF n=0 THEN 150
160 GOSUB 1030
170 PRINT rev$ FNat$(7,31)" "CHR$(150)+STRING$(24,154)+CHR$(156)" "
180 FOR x=8 TO 30:PRINT FNat(x,31)" "CHR$(149)CHR$(149)" "ROF$:FOR y=35 TO 57 STEP 2:PRINT FNat$(x,y)ER:NEXT:PRINT FNat$(X,55)REV$ " "CHR$(149)CHR$(149)" ":NEXT
190 PRINT rev$ FNat$(8,33)CHR$(150)+CHR$(154)ul$+STRING$(20,154)+nul$+CHR$(154)+CHR$(156)
200 PRINT FNat$(29,33)CHR$(147)+STRING$(22,154)+CHR$(153)
210 PRINT FNat$(30,31)" "CHR$(147)+STRING$(24,154)+CHR$(153)" "
220 PRINT rof$ FNAT$(5,0)CHR$(134)+STRING$(10,138)+CHR$(140)"     "CHR$(134)+STRING$(3,138)+CHR$(140)
230 PRINT FNat$(6,0)CHR$(133)"          "CHR$(133)"     "CHR$(133)"   "CHR$(133)
240 PRINT FNAT$(7,0)CHR$(131)+STRING$(10,138)+CHR$(137)"     "CHR$(131)+STRING$(3,138)+CHR$(137)
250 PRINT FNat$(8,0)rof$"TOTAL  SCORE     LEVEL"
260 PRINT FNAT$(24,67)CHR$(134)+STRING$(20,138)+CHR$(140)
270 PRINT FNAT$(5,67)CHR$(134)+STRING$(20,138)+CHR$(140)
280 PRINT FNat$(6,68)" PREVIOUS HI-SCORES"
290 FOR x=25 TO 29:PRINT FNat$(x,67)CHR$(133)" "er er er er er er er er er " " CHR$(133):NEXT
300 FOR x=6 TO 20:FOR y=67 TO 88 STEP 21:PRINT FNat$(x,y)CHR$(133):NEXT:NEXT
310 PRINT FNAT$(30,67)CHR$(131)+STRING$(20,138)+CHR$(137) 
320 PRINT FNAT$(21,67)CHR$(131)+STRING$(20,138)+CHR$(137) 
330 PRINT FNAT$(9,0)CHR$(134)+STRING$(20,138)+CHR$(140)
340 FOR x=10 TO 29:FOR y=0 TO 21 STEP 21:PRINT FNat$(x,y)CHR$(133):NEXT:NEXT
350 PRINT FNAT$(30,0)CHR$(131)+STRING$(20,138)+CHR$(137)
360 PRINT FNat$(10,2)B(1)
370 PRINT FNat$(13,2)B(2)
380 PRINT FNat$(15,2)B(4)
390 PRINT FNat$(18,2)B(8)
400 PRINT FNat$(21,2)B(12) 
410 PRINT FNat$(24,2)B(16) 
420 PRINT FNat$(27,4)B(18) 
430 'PRINT FNat$(26,75) b(n) 
440 MEMORY h!:RUN "TETRIS.OVL
450 c1=STRING$(2,8)+CHR$(10):c2=STRING$(4,8)+CHR$(10):c3=STRING$(6,8)+CHR$(10):b(1)=FNd$(4,0)+c2+FNd$(4,0)
460 a(1)=er+er+c2+er+er
470 e(1)=er+er
480 b(2)=FNd$(8,1)
490 a(2)=er+er+er+er
500 e(2)=er+er+er+er
510 b(3)=FNd$(2,1)+C1+FNd$(2,1)+c1+FNd$(2,1)+c1+FND$(2,1)
520 a(3)=er+C1+er+c1+er+c1+er
530 e(3)=er
540 b(4)=FNd$(6,2)+c1+FNd$(2,2)
550 a(4)=er+er+er+c1+er
560 e(4)=er+er+er
570 b(5)=FNd$(2,2)+c1+FNd$(2,2)+c2+FNd$(4,2)
580 a(5)=er+c1+er+c2+er+er
590 e(5)=er+c1+c1+er
600 b(6)=FNd$(2,2)+c1+FNd$(6,2)
610 a(6)=er+c1+er+er+er
620 e(6)=er+CHR$(10)+er+er
630 b(7)=FNd$(4,2)+c2+FNd$(2,2)+C1+FNd$(2,2)
640 a(7)=er+er+c2+er+C1+er
650 e(7)=er+er
660 b(8)=FNd$(6,3)+c3+FNd$(2,3)
670 a(8)=er+er+er+c3+er
680 e(8)=er+er+er
690 b(9)=FNd$(4,3)+c1+FNd$(2,3)+C1+FNd$(2,3)
700 a(9)=er+er+c1+er+C1+er
710 e(9)=er+er
720 b(10)=FNd$(2,3)+c3+FNd$(6,3)
730 a(10)=er+c3+er+er+er
740 e(10)=er+c3+er+er
750 b(11)=FNd$(2,3)+c1+FNd$(2,3)+c1+FNd$(4,3)
760 a(11)=er+c1+er+c1+er+er
770 e(11)=er+STRING$(2,10)+er
780 b(12)=FNd$(6,4)+c2+FNd$(2,4)
790 a(12)=er+er+er+c2+er
800 e(12)=er+er+er
810 b(13)=FNd$(2,4)+c2+FNd$(4,4)+c1+FNd$(2,4)
820 a(13)=er+c2+er+er+c1+er
830 e(13)=er+c2+er
840 b(14)=FNd$(2,4)+c2+FNd$(6,4)
850 a(14)=er+c2+er+er+er
860 e(14)=er+c2+er+FNd$(2,4)+er
870 b(15)=FNd$(2,4)+c1+FNd$(4,4)+c2+FNd$(2,4)
880 a(15)=er+c1+er+er+c2+er
890 e(15)=er+CHR$(10)+er
900 b(16)=FNd$(4,5)+c1+FNd$(4,5)
910 a(16)=er+er+c1+er+er
920 e(16)=er+er+CHR$(10)+er
930 b(17)=FNd$(2,5)+c2+FNd$(4,5)+c2+FNd$(2,5)
940 a(17)=er+c2+er+er+c2+er
950 e(17)=er+c2+er
960 b(18)=FNd$(4,6)+c3+FNd$(4,6)
970 a(18)=er+er+c3+er+er
980 e(18)=er+er+c3+er
990 b(19)=FNd$(2,6)+c1+FNd$(4,6)+c1+FNd$(2,6)
1000 a(19)=er+c1+er+er+c1+er
1010 e(19)=er+CHR$(10)+er
1020 RETURN
1030 banner(1)=FNd$(6,x(1))+" "+FNd$(6,x(1))+" "+FNd$(6,x(1))+" "+FNd$(6,x(1))+" "+FNd$(2,x(1))+" "+FNd$(6,x(1))
1040 banner(2)="  "+FNd$(2,x(2))+"   "+FNd$(2,x(2))+"       "+FNd$(2,x(2))+"   "+FNd$(2,x(2))+"  "+FNd$(2,x(2))+" "+FNd$(2,x(2))+" "+FNd$(2,x(2))
1050 banner(3)="  "+FNd$(2,x(3))+"   "+FNd$(4,x(3))+"     "+FNd$(2,x(3))+"   "+FNd$(5,X(3))+"  "+FNd$(2,x(3))+" "+FNd$(6,x(3))
1060 banner(4)="  "+FNd$(2,x(4))+"   "+FNd$(2,x(4))+"       "+FNd$(2,x(4))+"   "+FNd$(2,x(4))+"  "+FNd$(2,x(4))+" "+FNd$(2,x(4))+"     "+FNd$(2,x(4))
1070 banner(5)="  "+FNd$(2,x(5))+"   "+FNd$(6,x(5))+"   "+FNd$(2,x(5))+"   "+FNd$(2,x(5))+"  "+FNd$(2,x(5))+" "+FNd$(2,x(5))+" "+FNd$(6,x(5))
1080 FOR x=5 TO 1 STEP -1:PRINT FNat$(x-1,26)banner(x):NEXT
1090 RETURN
  • Listado 3 - TETRIS.OVL
10 OPTION RUN:h!=HIMEM:MEMORY,10000
20 ee$=CHR$(27):con$=ee$+"e"
30 ul$=ee$+"r":nul$=ee$+"u"
40 DEF FNat$(x,y)=ee$+"Y"+CHR$(32+x)+CHR$(32+y)
50 DEF FNd$(h,g)=STRING$(h,249+g)
70 rev$=ee$+"p":rof$=ee$+"q"
80 RANDOMIZE(PEEK(64504!))
90 DEFINT a-z:DEFSTR a,b,c,e,k
100 er=CHR$(248)+" "
110 DIM z(22,15),E(19),A(19),B(19),L(20),N$(12),s(12)
120 FOR x=0 TO 20:FOR y=0 TO 11 STEP 11:z(x,y)=1:NEXT:NEXT:FOR y=0 TO 11:z(21,y)=1:z(22,y)=1:NEXT
130 FOR i=0 TO 6:x(i)=i:NEXT
140 TOP=1:GOSUB 1760
150 n=(RND*19):IF n=0 THEN 150
440 GOSUB 2500
450 i=0:k=""
460 WHILE k="":k=INKEY$:GOSUB 2630:PRINT FNat$(6,18)"   ":GOSUB 2630:PRINT FNat$(6,18)rev$" ? "rof$:WEND
470 IF INSTR("-.*=+",k)>0 THEN k="":GOTO 460
480 r=VAL(k):IF r=0 THEN r=5
490 PRINT FNat$(6,18)USING "*#*";r
500 x1=1:x=1:y1=4:y=4
510 PRINT FNat$(26,75)a(n)
520 p=t:t=n:n=RND*19
530 IF n=0 THEN n=2
540 PRINT FNat$(26,75)b(n)
550 GOSUB 1240
560 GOSUB 1550
570 ok=FRE(""):IF r<9 THEN FOR delay=1 TO 8191 STEP (2^(r*1.5)):NEXT
580 k=INKEY$:IF k="" THEN 590 ELSE I=INSTR(CHR$(1)+CHR$(6)+CHR$(31)+CHR$(30)+CHR$(27),k):IF I>0 THEN 610
590 k=INKEY$:x=x+1:GOSUB 1240:GOSUB 1280
600 GOTO 570
610 ON I GOTO 620,760,950,1200,2340
620 ON T GOTO 630,640,650,660,670,630,680,630,690,700,680,710,720,730,680,710,740,730,750
630 IF z(x,y-1) OR z(x+1,y-1) THEN 590 ELSE GOTO 1180
640 IF z(x,y-1) THEN 590 ELSE GOTO 1180
650 IF z(x,y-1) OR z(x+1,y-1) OR z(x+2,y-1) OR z(x+3,y-1) THEN 590 ELSE GOTO 1180
660 IF z(x,y-1) OR z(x+1,y+1) THEN 590 ELSE GOTO 1180
670 IF z(x,y-1) OR z(x+1,y-1) OR z(x+2,y-2) THEN 590 ELSE GOTO 1180
680 IF z(x,y-1) OR z(x+1,y-1) OR z(x+2,y-1) THEN 590 ELSE GOTO 1180
690 IF z(x,y-1) OR z(x+1,y) OR z(x+2,y) THEN 590 ELSE 1180
700 IF z(x,y-1) OR z(x+1,y-3) THEN 590 ELSE  1180
710 IF z(x,y-1) OR z(x+1,y) THEN 590 ELSE  1180
720 IF z(x,y-1) OR z(x+1,y-2) OR z(x+2,y-1) THEN 590 ELSE  1180
730 IF z(x,y-1) OR z(x+1,y-2) THEN 590 ELSE  1180
740 IF z(x,y-1) OR z(x+1,y-2) OR z(x+2,y-2) THEN 590 ELSE  1180
750 IF z(x,y-1) OR z(x+1,y-1) OR z(x+2,y) THEN 590 ELSE  1180
760 ON T GOTO 770,780,790,800,810,820,830,840,850,860,870,880,810,890,900,910,920,930,940
770 IF z(x,y+2) OR z(x+1,y+2) THEN 590 ELSE GOTO 1190
780 IF z(x,y+4) THEN 590 ELSE GOTO 1190
790 IF z(x,y+1) OR z(x+1,y+1) OR z(x+2,y+1) OR z(x+3,y+1) THEN 590 ELSE GOTO 1190
800 IF z(x,y+3) OR z(x+1,y+3) THEN 590 ELSE GOTO 1190
810 IF z(x,y+1) OR z(x+1,y+1) OR z(x+2,y+1) THEN 590 ELSE GOTO 1190
820 IF z(x,y+1) OR z(x+1,y+3) THEN 590 ELSE GOTO 1190
830 IF z(x,y+2) OR z(x+1,y+1) OR z(x+2,y+1) THEN 590 ELSE 1190
840 IF z(x,y+3) OR z(x+1,y+1) THEN 590 ELSE  1190
850 IF z(x,y+2) OR z(x+1,y+2) OR z(x+2,y+2) THEN 590 ELSE  1190
860 IF z(x,y+1) OR z(x+1,y+1) THEN 590 ELSE  1190
870 IF z(x,y+1) OR z(x+1,y+1) OR z(x+2,y+2) THEN 590 ELSE  1190
880 IF z(x,y+3) OR z(x+1,y+2) THEN 590 ELSE  1190
890 IF z(x,y+1) OR z(x+1,y+2) THEN 590 ELSE  1190
900 IF z(x,y+1) OR z(x+1,y+2) OR z(x+2,y+1) THEN 590 ELSE GOTO 1190
910 IF z(x,y+2) OR z(x+1,y+3) THEN 590 ELSE  1190
920 IF z(x,y+1) OR z(x+1,y+1) OR z(x+2,y) THEN 590 ELSE GOTO 1190
930 IF z(x,y+2) OR z(x+1,y+1) THEN 590 ELSE  1190
940 IF z(x,y+1) OR z(x+1,y+2) OR z(x+2,y+2) THEN 590 ELSE GOTO 1190
950 ON t GOTO 590,960,970,980,990,1000,1010,1020,1029,1040,1050,1060,1070,1080,1090,1100,1110,1120,1130:RETURN
960 IF z(x+1,y) OR z(x+2,y) OR z(x+3,y) THEN 590 ELSE p=t:t=3:GOTO 1140 
970 IF z(x,y+1) OR z(x,y+2) OR z(x,y+3) THEN 590 ELSE p=t:t=2:GOTO 1140 
980 IF z(x+1,y) OR z(x+2,y) OR z(x+2,y-1) THEN 590 ELSE p=t:t=5:GOTO 1140 
990 IF z(x+1,y+1) OR z(x+2,y+2) THEN 590 ELSE p=t:t=6:GOTO 1140 
1000 IF z(x,y+1) OR z(x+2,y) THEN 590 ELSE p=t:t=7:GOTO 1140 
1010 IF z(x,y+2) OR z(x+1,y+2) THEN 590 ELSE p=t:t=4:GOTO 1140 
1020 IF z(x+1,y+1) OR z(x+2,y+1) THEN 590 ELSE p=t:t=9:GOTO 1140 
1029 '
1030 IF z(x+1,MAX(0,y-2)) OR z(x+1,y-1) OR z(x+1,y) THEN 590 ELSE p=t:t=10:GOTO 1140 
1040 IF z(x+2,y) OR z(x+2,y+1) THEN 590 ELSE p=t:t=11:GOTO 1140 
1050 IF z(x,y+2) OR z(x,y+3) THEN 590 ELSE p=t:t=8:GOTO 1140 
1060 IF z(x+1,y-1) OR z(x+1,y) OR z(x+2,y) THEN 590 ELSE p=t:t=13:GOTO 1140 
1070 IF z(x+1,y+1) THEN 590 ELSE p=t:t=14:GOTO 1140 
1080 IF z(x+2,y) THEN 590 ELSE p=t:t=15:GOTO 1140 
1090 IF z(x,y+1) OR z(x,y+2) THEN 590 ELSE p=t:t=12:GOTO 1140 
1100 IF z(x+1,y) OR z(x+1,y-1) OR z(x+2,y-1) THEN 590 ELSE p=t:t=17:GOTO 1140 
1110 IF z(x,y+1) OR z(x+1,y+1) OR z(x+1,y+2) THEN 590 ELSE p=t:t=16:GOTO 1140 
1120 IF z(x+1,y+1) OR z(x+2,y+1) THEN 590 ELSE p=t:t=19:GOTO 1140 
1130 IF z(x+1,y-1) OR z(x,y+1) THEN 590 ELSE p=t:t=18:GOTO 1140 
1140 PRINT FNat$(x+8,y*2+33) a(p) 
1150 PRINT FNat$(x+8,y*2+33) b(t) 
1160 GOSUB 1280
1170 GOTO 590
1180 PRINT FNat$(x+8,y*2+33)a(t):y=y-1:GOSUB 1250:GOSUB 1280:GOTO 590
1190 PRINT FNat$(x+8,y*2+33)a(t):y=y+1:GOSUB 1250:GOSUB 1280:GOTO 590
1200 drop=1:x=x+1:GOSUB 1280:IF landed=0 THEN GOTO 1200
1210 PRINT FNat$(x1+8,y1*2+33) a(t) 
1220 PRINT FNat$(x+8,y*2+33) b(t) 
1230 landed=0:GOSUB 1280
1240 PRINT FNat$(x1+8,y1*2+33)E(T) 
1250 PRINT FNat$(x+8,y*2+33)B(T)
1260 x1=x:y1=y
1270 RETURN
1280 ON t GOSUB 1290,1300,1310,1320,1330,1340,1350,1360,1370,1380,1390,1400,1410,1420,1430,1440,1450,1460,1470:RETURN
1290 IF z(x+2,y) OR z(x+2,y+1) THEN z(x,y)=1:z(x,y+1)=1:z(x+1,y)=1:z(x+1,y+1)=1:GOTO 1480 ELSE RETURN
1300 IF z(x+1,y) OR z(x+1,y+1) OR z(x+1,y+2) OR z(x+1,y+3) THEN z(x,y)=2:z(x,y+1)=2:z(x,y+2)=2:z(x,y+3)=2:GOTO 1480 ELSE RETURN
1310 IF z(x+4,y) THEN z(x,y)=2:z(x+1,y)=2:z(x+2,y)=2:z(x+3,y)=2:GOTO 1480 ELSE RETURN
1320 IF z(x+1,y) OR z(x+1,y+1) OR z(x+2,y+2) THEN z(x,y)=3:z(x,y+1)=3:z(x,y+2)=3:z(x+1,y+2)=3:GOTO 1480 ELSE RETURN
1330 IF z(x+3,y-1) OR z(x+3,y) THEN z(x,y)=3:z(x+1,y)=3:z(x+2,y-1)=3:z(x+2,y)=3:GOTO 1480 ELSE RETURN
1340 IF z(x+2,y) OR z(x+2,y+1) OR z(x+2,y+2) THEN z(x,y)=3:z(x+1,y)=3:z(x+1,y+1)=3:z(x+1,y+2)=3:GOTO 1480 ELSE RETURN
1350 IF z(x+3,y) OR z(x+1,y+1) THEN z(x,y)=3:z(x,y+1)=3:z(x+1,y)=3:z(x+2,y)=3:GOTO 1480 ELSE RETURN
1360 IF z(x+2,y) OR z(x+1,y+1) OR z(x+1,y+2) THEN z(x,y)=4:z(x,y+1)=4:z(x,y+2)=4:z(x+1,y)=4:GOTO 1480 ELSE RETURN
1370 IF z(x+1,y) OR z(x+3,y+1) THEN z(x,y)=4:z(x,y+1)=4:z(x+1,y+1)=4:z(x+2,y+1)=4:GOTO 1480 ELSE RETURN
1380 IF z(x+2,y-2) OR z(x+2,y-1) OR z(x+2,y) THEN z(x,y)=4:z(x+1,y-2)=4:z(x+1,y-1)=4:z(x+1,y)=4:GOTO 1480 ELSE RETURN
1390 IF z(x+3,y) OR z(x+3,y+1) THEN z(x,y)=4:z(x+1,y)=4:z(x+2,y)=4:z(x+2,y+1)=4:GOTO 1480 ELSE RETURN
1400 IF z(x+1,y) OR z(x+2,y+1) OR z(x+1,y+2) THEN z(x,y)=5:z(x,y+1)=5:z(x,y+2)=5:z(x+1,y+1)=5:GOTO 1480 ELSE RETURN
1410 IF z(x+2,y-1) OR z(x+3,y) THEN z(x,y)=5:z(x+1,y-1)=5:z(x+1,y)=5:z(x+2,y)=5:GOTO 1480 ELSE RETURN
1420 IF z(x+2,y-1) OR z(x+2,y) OR z(x+2,y+1) THEN z(x,y)=5:z(x+1,y-1)=5:z(x+1,y)=5:z(x+1,y+1)=5:GOTO 1480 ELSE RETURN
1430 IF z(x+3,y) OR z(x+2,y+1) THEN z(x,y)=5:z(x+1,y)=5:z(x+1,y+1)=5:z(x+2,y)=5:GOTO 1480 ELSE RETURN
1440 IF z(x+1,y) OR z(x+2,y+1) OR z(x+2,y+2) THEN z(x,y)=6:z(x,y+1)=6:z(x+1,y+1)=6:z(x+1,y+2)=6:GOTO 1480 ELSE RETURN
1450 IF z(x+3,y-1) OR z(x+2,y) THEN z(x,y)=6:z(x+1,y-1)=6:z(x+1,y)=6:z(x+2,y-1)=6:GOTO 1480 ELSE RETURN
1460 IF z(x+2,y-1) OR z(x+2,y) OR z(x+1,y+1) THEN z(x,y)=7:z(x,y+1)=7:z(x+1,y-1)=7:z(x+1,y)=7:GOTO 1480 ELSE RETURN
1470 IF z(x+2,y) OR z(x+3,y+1) THEN z(x,y)=7:z(x+1,y)=7:z(x+1,y+1)=7:z(x+2,y+1)=7:GOTO 1480 ELSE RETURN
1480 IF x<3 THEN k=INKEYS$:k=INKEY$:GOTO 2340
1490 IF drop THEN drop=0:landed=1:RETURN
1500 TOP=MIN(TOP,x):FOR xx=x TO 20:l(xx)=0:FOR yy=1 TO 10
1510 IF z(xx,yy) THEN l(xx)=l(xx)+1
1520 NEXT:NEXT
1530 FOR XX=x TO 20:IF L(xx)=10 THEN PRINT CHR$(7):GOSUB 1700
1540 NEXT:GOTO 500
1550 ON t GOSUB 1630,1640,1640,1650,1650,1650,1650,1660,1660,1660,1660,1670,1670,1670,1670,1680,1680,1690,1690:d(8)=d(8)+1:PRINT FNat$(29,14) USING "####";d(8):PRINT FNat$(6,2) USING "#######";s 
1560 IF s>500 AND  r<2 THEN r=2
1570 IF s>1000 AND r<3 THEN r=3
1572 IF s>1250 AND r<4 THEN r=4
1580 IF s>1500 AND r<5 THEN r=5
1582 IF s>1750 AND r<6 THEN r=6
1590 IF s>2000 AND r<7 THEN r=7
1592 IF s>2500 AND r<8 THEN r=8
1600 IF s>3000 AND r<9 THEN r=9
1610 PRINT FNat$(6,18) USING "*#*";r
1620 RETURN
1630 s=s+15+(r/2):d(1)=d(1)+1:PRINT FNat$(11,15) USING "###";d(1):RETURN
1640 s=s+15+(r/2):d(2)=d(2)+1:PRINT FNat$(13,15) USING "###";d(2):RETURN
1650 s=s+17+(r/2):d(3)=d(3)+1:PRINT FNat$(15,15) USING "###";d(3):RETURN
1660 s=s+17+(r/2):d(4)=d(4)+1:PRINT FNat$(18,15) USING "###";d(4):RETURN
1670 s=s+19+(r/2):d(5)=d(5)+1:PRINT FNat$(21,15) USING "###";d(5):RETURN
1680 s=s+19+(r/2):d(6)=d(6)+1:PRINT FNat$(24,15) USING "###";d(6):RETURN
1690 s=s+19+(r/2):d(7)=d(7)+1:PRINT FNat$(27,15) USING "###";d(7):RETURN
1700 FOR ya=1 TO 10:FOR xa=xx TO TOP STEP -1
1710 IF z(xa,ya)=z(xa-1,ya) THEN 1740
1720 z(xa,ya)=z(xa-1,ya) 
1730 IF z(xa,ya) THEN PRINT FNat$(xa+8,ya*2+33) FNd$(2,(z(xa,ya)-1)) ELSE  PRINT FNat$(xa+8,ya*2+33)er
1740 NEXT:NEXT
1750 TOP=TOP+1:s=s+(r*4):PRINT FNat$(6,2) USING "#######";s :RETURN
1760 c1=STRING$(2,8)+CHR$(10):c2=STRING$(4,8)+CHR$(10):c3=STRING$(6,8)+CHR$(10):b(1)=FNd$(4,0)+c2+FNd$(4,0)
1770 a(1)=er+er+c2+er+er
1780 e(1)=er+er
1790 b(2)=FNd$(8,1)
1800 a(2)=er+er+er+er
1810 e(2)=er+er+er+er
1820 b(3)=FNd$(2,1)+C1+FNd$(2,1)+c1+FNd$(2,1)+c1+FND$(2,1)
1830 a(3)=er+C1+er+c1+er+c1+er
1840 e(3)=er
1850 b(4)=FNd$(6,2)+c1+FNd$(2,2)
1860 a(4)=er+er+er+c1+er
1870 e(4)=er+er+er
1880 b(5)=FNd$(2,2)+c1+FNd$(2,2)+c2+FNd$(4,2)
1890 a(5)=er+c1+er+c2+er+er
1900 e(5)=er+c1+c1+er
1910 b(6)=FNd$(2,2)+c1+FNd$(6,2)
1920 a(6)=er+c1+er+er+er
1930 e(6)=er+CHR$(10)+er+er
1940 b(7)=FNd$(4,2)+c2+FNd$(2,2)+C1+FNd$(2,2)
1950 a(7)=er+er+c2+er+C1+er
1960 e(7)=er+er
1970 b(8)=FNd$(6,3)+c3+FNd$(2,3)
1980 a(8)=er+er+er+c3+er
1990 e(8)=er+er+er
2000 b(9)=FNd$(4,3)+c1+FNd$(2,3)+C1+FNd$(2,3)
2010 a(9)=er+er+c1+er+C1+er
2020 e(9)=er+er
2030 b(10)=FNd$(2,3)+c3+FNd$(6,3)
2040 a(10)=er+c3+er+er+er
2050 e(10)=er+c3+er+er
2060 b(11)=FNd$(2,3)+c1+FNd$(2,3)+c1+FNd$(4,3)
2070 a(11)=er+c1+er+c1+er+er
2080 e(11)=er+STRING$(2,10)+er
2090 b(12)=FNd$(6,4)+c2+FNd$(2,4)
2100 a(12)=er+er+er+c2+er
2110 e(12)=er+er+er
2120 b(13)=FNd$(2,4)+c2+FNd$(4,4)+c1+FNd$(2,4)
2130 a(13)=er+c2+er+er+c1+er
2140 e(13)=er+c2+er
2150 b(14)=FNd$(2,4)+c2+FNd$(6,4)
2160 a(14)=er+c2+er+er+er
2170 e(14)=er+c2+er+FNd$(2,4)+er
2180 b(15)=FNd$(2,4)+c1+FNd$(4,4)+c2+FNd$(2,4)
2190 a(15)=er+c1+er+er+c2+er
2200 e(15)=er+CHR$(10)+er
2210 b(16)=FNd$(4,5)+c1+FNd$(4,5)
2220 a(16)=er+er+c1+er+er
2230 e(16)=er+er+CHR$(10)+er
2240 b(17)=FNd$(2,5)+c2+FNd$(4,5)+c2+FNd$(2,5)
2250 a(17)=er+c2+er+er+c2+er
2260 e(17)=er+c2+er
2270 b(18)=FNd$(4,6)+c3+FNd$(4,6)
2280 a(18)=er+er+c3+er+er
2290 e(18)=er+er+c3+er
2300 b(19)=FNd$(2,6)+c1+FNd$(4,6)+c1+FNd$(2,6)
2310 a(19)=er+c1+er+er+c1+er
2320 e(19)=er+CHR$(10)+er
2330 RETURN
2340 FOR q=1 TO 12:IF s>s(q) THEN 2360
2350 NEXT:GOTO 2410
2360 PRINT FNat$(20,68)" PLEASE INSERT NAME"
2370 FOR qq=12 TO q+1 STEP -1:n$(qq)=n$(qq-1):s(qq)=s(qq-1):NEXT:n$(q)="          ":s(q)=s
2380 FOR qq=1 TO 12:PRINT FNat$(7+qq,70) n$(qq) :PRINT FNat$(7+qq,81) USING "#####";s(qq):NEXT
2390 PRINT FNat$(q+7,70);:INPUT"",n$(q):n$(q)=UPPER$(LEFT$(n$(q),10))
2400 PRINT FNat$(7+q,70) n$(q)+SPACE$(11-LEN(n$(q))):PRINT FNat$(7+q,81) USING "#####";s(q)
2410 PRINT FNat$(20,68)"  PLAY AGAIN Y/N?  "
2420 k=UPPER$(INPUT$(1)):PRINT FNat$(20,68)"                 ":IF k="Y" THEN ERASE z,e,b,l,d:GOTO 2560
2430 IF k="N" THEN PRINT CHR$(7) ELSE GOTO 2410
2440 OPEN "O",#1,"TETRIS.REC"
2450 FOR q=1 TO 12
2460 WRITE #1, n$(q),s(q)
2470 NEXT
2480 CLOSE 
2490 MEMORY h!:end
2500 IF FIND$("TETRIS.REC")<>"" THEN OPEN "I",#1,"TETRIS.REC" ELSE PRINT FNat$(8,70)"NO RECORDS YET":GOTO 2550 
2510 FOR q=1 TO 12
2520 INPUT #1, n$(q),s(q)
2530 PRINT FNat$(7+q,70) n$(q) FNat$(7+q,81) USING "#####";s(q):NEXT
2540 CLOSE
2550 RETURN
2560 DIM z(22,15),E(19),B(19),L(20)
2570 FOR x=1 TO 20
2580 PRINT FNat$(x+8,35)er er er er er er er er er er
2590 PRINT FNat$(x+9,10)"          "
2600 NEXT:s=0
2610 FOR x=0 TO 20:FOR y=0 TO 11 STEP 11:z(x,y)=1:NEXT:NEXT:FOR y=0 TO 11:z(21,y)=1:NEXT
2620 GOSUB 1760:GOTO 450
2630 SWAP x(1),x(2):SWAP x(2),x(3):SWAP x(3),x(4):SWAP x(4),x(5):SWAP x(5),X(6):SWAP x(6),x(7)
2640 banner(1)=FNd$(6,x(1))+" "+FNd$(6,x(1))+" "+FNd$(6,x(1))+" "+FNd$(6,x(1))+" "+FNd$(2,x(1))+" "+FNd$(6,x(1))
2650 banner(2)="  "+FNd$(2,x(2))+"   "+FNd$(2,x(2))+"       "+FNd$(2,x(2))+"   "+FNd$(2,x(2))+"  "+FNd$(2,x(2))+" "+FNd$(2,x(2))+" "+FNd$(2,x(2))
2660 banner(3)="  "+FNd$(2,x(3))+"   "+FNd$(4,x(3))+"     "+FNd$(2,x(3))+"   "+FNd$(5,X(3))+"  "+FNd$(2,x(3))+" "+FNd$(6,x(3))
2670 banner(4)="  "+FNd$(2,x(4))+"   "+FNd$(2,x(4))+"       "+FNd$(2,x(4))+"   "+FNd$(2,x(4))+"  "+FNd$(2,x(4))+" "+FNd$(2,x(4))+"     "+FNd$(2,x(4))
2680 banner(5)="  "+FNd$(2,x(5))+"   "+FNd$(6,x(5))+"   "+FNd$(2,x(5))+"   "+FNd$(2,x(5))+"  "+FNd$(2,x(5))+" "+FNd$(2,x(5))+" "+FNd$(6,x(5))
2690 FOR x=5 TO 1 STEP -1:PRINT FNat$(x-1,26)banner(x):NEXT
2700 RETURN

Controles

      ↑ = ROTAR FICHA
      ↓ = ACELERAR CAÍDA
      → = DERECHA
      ← = IZQUIERDA
   EXIT = ABANDONAR PARTIDA

Carga del programa

1.- Introducir el disco CP/M por la cara 2
2.- Escribir BASIC y esperar a que cargue
3.- Retirar el disco CP/M e introducir el disco que contiene el juego Tetris
4.- Teclear run "Tetris" y pulsar la tecla "ENTER"

Extras

Descarga

  • Tetris (juego en formato dsk, comprimido con zip)

Enlaces

es/tetris.txt · Última modificación: 2017/01/18 12:29 por jevicac