10 REM TETRIS Title
20 IFPAGE<>&1100:PAGE=&1100:CHAIN"TIT
LE"
30 MODE129
40 NumShapes=21
50 ?&7D=NumShapes
60 *FX229 1
70 *DISC
80 VDU19,1,5;0;0;0;
90 VDU19,2,2;0;0;0;
100 VDU19,3,6;0;0;0;
110 VDU23,150,255,255,254,252,248,240,
224,192
120 VDU23,151,128,0,0,0,0,0,0,0
130 VDU23,152,63,63,63,63,63,63,63,63
140 VDU23,153,63,63,62,60,56,48,32,0
150 VDU23,154,255,255,127,63,31,15,7,3
160 VDU23,155,1,0,0,0,0,0,0,0
170 VDU23,156,252,252,252,252,252,252,
252,252
180 VDU23,157,252,252,124,60,28,12,4,0
190 VDU23,158,31,15,3,0,0,0,0,0
200 VDU23,159,255,255,255,127,31,7,1,0
210 VDU23,160,0,0,0,1,3,7,15,31
220 VDU23,161,32,96,224,224,224,224,22
4,224
230 VDU23,162,15,7,3,1,0,0,0,0
240 VDU23,163,224,224,224,224,224,96,3
2,0
250 VDU23,164,0,0,0,0,0,3,15,31
260 VDU23,165,0,1,7,31,127,255,255,255
270 VDU23,166,7,7,7,7,7,7,7,7
280 VDU23,167,192,240,248,254,254,255,
255,254
290 VDU23,169,254,252,252,248,240,192,
128,128
300 VDU23,170,0,0,128,192,224,240,248,
252
310 VDU23,171,254,255,255,255,255,255,
255,255
320 VDU23,172,0,0,128,192,224,240,248,
252
330 VDU23,173,31,126,254,255,255,127,1
27,63
340 VDU23,174,127,63,31,15,3,128,128,1
92
350 VDU23,175,252,252,252,252,252,252,
60,12
360 VDU23,176,63,31,31,15,15,15,7,7
370 VDU23,177,192,224,224,240,240,248,
248,252
380 VDU23,178,254,255,127,127,63,63,31
,15
390 VDU23,179,0,0,128,192,224,224,224,
240
400 VDU23,183,3,1,0,0,0,0,0,0
410 VDU23,180,0,0,192,240,252,254,255,
255
420 VDU23,181,7,7,7,7,15,31,31,158
430 VDU23,182,240,240,240,240,224,192,
128,0
440 VDU23,184,12,15,15,15,15,15,15,15
450 VDU23,254,255,195,219,219,219,219,
195,255
460 VDU23,253,255,255,255,231,231,255,
255,255
470 VDU23,252,255,255,195,219,219,195,
255,255
480 COLOUR3:PRINTTAB(2,2)CHR$152;CHR$1
50:COLOUR2:PRINTTAB(2,3)CHR$153;CHR$151
490 COLOUR3:PRINTTAB(4,2)CHR$255:COLOU
R2:PRINTTAB(4,3)CHR$255:COLOUR1:PRINTTAB
(4,4)CHR$255;TAB(4,5)CHR$255
500 COLOUR3:PRINTTAB(5,2)CHR$154;CHR$1
56:COLOUR2:PRINTTAB(5,3)CHR$155;CHR$157
510 COLOUR3:PRINTTAB(9,2)CHR$255:COLOU
R2:PRINTTAB(9,3)CHR$255:COLOUR1:PRINTTAB
(9,4)CHR$255;TAB(9,5)CHR$255
520 COLOUR3:PRINTTAB(10,2)CHR$158;CHR$
159;:COLOUR1:PRINTTAB(10,5)CHR$164;CHR$1
65
530 COLOUR2:PRINTTAB(10,3)CHR$160;CHR$
161:COLOUR1:PRINTTAB(10,4)CHR$162;CHR$16
3
540 COLOUR3:PRINTTAB(14,2)CHR$152;CHR$
150:COLOUR2:PRINTTAB(14,3)CHR$153;CHR$15
1
550 COLOUR3:PRINTTAB(16,2)CHR$255:COLO
UR2:PRINTTAB(16,3)CHR$255:COLOUR1:PRINTT
AB(16,4)CHR$255;TAB(16,5)CHR$255
560 COLOUR3:PRINTTAB(17,2)CHR$154;CHR$
156:COLOUR2:PRINTTAB(17,3)CHR$155;CHR$15
7
570 COLOUR3:PRINTTAB(21,2)CHR$255:COLO
UR2:PRINTTAB(21,3)CHR$255:COLOUR1:PRINTT
AB(21,4)CHR$255;TAB(21,5)CHR$255
580 COLOUR3:PRINTTAB(22,2)CHR$166;CHR$
167:COLOUR2:PRINTTAB(22,3)CHR$166;CHR$16
9
590 COLOUR1:PRINTTAB(22,4)CHR$166;CHR$
170;TAB(22,5)CHR$166;CHR$171;CHR$172
600 COLOUR3:PRINTTAB(27,2)CHR$255:COLO
UR2:PRINTTAB(27,3)CHR$255:COLOUR1:PRINTT
AB(27,4)CHR$255;TAB(27,5)CHR$255
610 PRINTTAB(30,5)CHR$184:COLOUR3:PRIN
TTAB(31,2)CHR$173;CHR$174;CHR$175:COLOUR
2:PRINTTAB(31,3)CHR$176;CHR$177;" ":COLO
UR1:PRINTTAB(31,4)CHR$183;CHR$178;CHR$17
9;TAB(31,5)CHR$180;CHR$181;CHR$182
620 PRINT''"TETRIS is a new type of
puzzle game"'"from the Soviet Union.
It's really"'"simple to play. Seven di
fferent shapped"'"blocks fall down the
game field one"'"after the other. T
he object of the"
630 PRINT"game is to keep the blocks f
rom piling"'"up to the top of the game f
ield."'
640 PRINT"To do this, you can move the
blocks to"'"the left and right, and rot
ate them"'"as they fall. If you can comp
letely"'"fill in one horizontal line, th
at line"'"disappears and your score incr
eases"'"If the blocks pile up to the top
";
650 PRINT" then"'"that's the end of th
e game. TETRIS"'"is simple, easy-to-unde
rstand and"'"difficult to drag yourself
away from!"'"TETRIS originally came from
the word"'"""tetra"" meaning the number
4."
660 PRINT"By rearranging four squares,
you can"'"make seven different shapes w
hich are"'"the pieces in this game. As t
he game"'"progresses, more difficult sha
pes are"'"added."
670 FORI%=&B4B TO &CB3:?I%=0:NEXT:REM
CLEAR SCREEN ARRAY
680 PRINT'" PRESS <RETURN>....";
:VDU28,0,31,39,5:REPEATUNTILGET=13
690 CLS:PRINT"The KEYS are :"'''" Mov
es block to the left"''" Moves block to
the right"''" Drops the block"''"Z Rot
ates block 90 degrees anti-clockwise"''"
X Rotates block 90 degrees clockwise."
700 PRINT'"And <ESCAPE> To Quit."
710 FORI%=0TO (NumShapes*2)-1 STEP2:RE
ADD1%,D2%:?(&FA2+I%)=D1%:?(&FA2+I%+1)=D2
%:NEXT
720 PRINT''"Press <RETURN> To play..."
;:REPEATUNTILGET=13:PAGE=&1100:CHAIN"TET
RIS"
730 REM SHAPE DEFINITIONS
740 DATA51,0
750 DATA17,3
760 DATA49,2
770 DATA17,17
780 DATA34,3
790 DATA50,1
800 DATA114,0
810 DATA51,2
820 DATA17,49
830 DATA34,50
840 DATA114,2
850 DATA17,19
860 DATA49,17
870 DATA51,1
880 DATA34,7
890 DATA100,3
900 DATA117,0
910 DATA51,51
920 DATA34,37
930 DATA119,7
940 DATA185,14