- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
program tetris;
uses
crt;
var
ss,nn,x,y,pus,a,b,c,d,lin,rlin:integer;
st:array[1..12] of array[1..22] of integer;
procedure k(x,y:integer);
{ђЁб㥬 Єў а¤а вЁЄ}
begin
gotoxy(x*2+27,25-y);
if ss=0 then write(' ');
if ss=1 then write('[]');
if ss=2 then write(chr(177),chr(177));
if (ss=3) and (st[x,y]>0) then pus:=1;
if ss=4 then st[x,y]:=1;
gotoxy(1,1);write(' ');
end;
procedure fig(x,y,n,s:integer);
{ђЁб㥬 дЁЈгаг}
begin
if s=3 then pus:=0;
ss:=s; k(x,y);
if n=1 then begin k(x+1,y);k(x,y-1);k(x+1,y-1) end;
if n=2 then begin k(x-1,y);k(x+1,y);k(x+2,y) end;
if n=3 then begin k(x,y+1);k(x,y-1);k(x,y-2) end;
if n=4 then begin k(x+1,y);k(x-1,y);k(x-1,y+1) end;
if n=5 then begin k(x,y+1);k(x+1,y+1);k(x,y-1) end;
if n=6 then begin k(x-1,y);k(x+1,y);k(x+1,y-1) end;
if n=7 then begin k(x,y+1);k(x,y-1);k(x-1,y-1) end;
if n=8 then begin k(x-1,y);k(x+1,y);k(x+1,y+1) end;
if n=9 then begin k(x,y+1);k(x,y-1);k(x+1,y-1) end;
if n=10 then begin k(x+1,y);k(x-1,y);k(x-1,y-1) end;
if n=11 then begin k(x,y+1);k(x,y-1);k(x-1,y+1) end;
if n=12 then begin k(x-1,y);k(x,y-1);k(x+1,y-1) end;
if n=13 then begin k(x,y+1);k(x-1,y);k(x-1,y-1) end;
if n=14 then begin k(x+1,y);k(x-1,y-1);k(x,y-1) end;
if n=15 then begin k(x-1,y);k(x,y-1);k(x-1,y+1) end;
if n=16 then begin k(x+1,y);k(x-1,y);k(x,y+1) end;
if n=17 then begin k(x+1,y);k(x,y+1);k(x,y-1) end;
if n=18 then begin k(x,y-1);k(x-1,y);k(x+1,y) end;
if n=19 then begin k(x-1,y);k(x,y+1);k(x,y-1) end
end;
procedure pov;
{Џ®ў®а®в дЁЈгал}
begin
nn:=nn-1;
if nn=15 then nn:=19;
if nn=13 then nn:=15;
if nn=11 then nn:=13;
if nn=7 then nn:=11;
if nn=3 then nn:=7;
if nn=1 then nn:=3;
if nn=0 then nn:=1;
end;
procedure clrst;
{ЋзЁбвЄ бв Є }
begin
for x:=1 to 12 do
for y:=1 to 22 do
if (x=1) or (x=12) or (y=1) then st[x,y]:=2 else st[x,y]:=0;
end;
procedure risvesst;
{ђЁб®ў вм ўҐбм бв Є }
begin
for x:=1 to 12 do for y:=1 to 22 do
begin
ss:=st[x,y];
k(x,y)
end;
end;
procedure dvig;
{„ўЁ¦ҐЁҐ}
var
i:integer;key:char;
begin
for i:=1 to 10 do
begin
delay(d);
key:=' ';
if keypressed then key:=readkey;
if key='i' then
begin
fig(x-1,y,nn,3);
if pus=0 then begin fig(x,y,nn,0); x:=x-1; fig(x,y,nn,1); end;
end;
TheHamstertamer 10.01.2012 21:27 # +7
Kylee Strutt Anal POV?
bugmenot 10.01.2012 21:35 # +6
Govnocoder#0xFF 10.01.2012 21:41 # +9
> dvig
> fig
Сделал мою ночь.
dos_ 14.01.2012 23:38 # +5
bugmenot 15.01.2012 04:35 # +6
dos_ 15.01.2012 22:25 # +5
dos_ 05.02.2012 01:52 # +4
end;{автор забыл}
BEGIN
END.
Не проходит.
guest8 09.04.2019 12:29 # −999
MAKAKA 09.03.2021 02:57 # 0
Novi4oK 24.08.2021 03:15 # 0