У нас: 141825 рефератів
Щойно додані Реферати Тор 100
Скористайтеся пошуком, наприклад Реферат        Грубий пошук Точний пошук
Вхід в абонемент


РПаЎ±б>юяюяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяямҐБq`шїbjbjqPqP2(::кяяяяяя¤ттттZZZn2ґ2ґ2ґ2ґd–ґЊn)t.¶‚°¶°¶°¶°¶Џ·Џ·Џ·з'й'й'й'й'й'й'$ђ*hш,љ(ЙZЏ·‹·Џ·Џ·Џ·(тт°¶°¶ЫЦ('''Џ·@тt°¶Z°¶з''Џ·з'''c'fфZ‹'°¶"¶ ЧEmо¦И2ґЏчl.'Г'$м(0)ѓ'’-ы%ъ’-‹'’-Z‹'8'Џ·Џ·Џ·((х&Џ·Џ·Џ·)Џ·Џ·Џ·Џ·nnnДЄ2ґnnn2ґnnnттттттяяяя1. >AB0=>2:0 7040GV   >7@>18B8 0;3>@8B< ?@>3@0<8, I> 28:>=CT ?5@5<VI5==O DV3C@ ?> 5:@0=C 73>@8 4>=87C, :>>@48=0FVN WE <VAF57=0E>4E5==O C 2V4?>2V4=>ABV 4> 4V9 3@0NG>3>.  $V3C@8 A:;040NBLAO 7 :204@0BV2 >4=0:>2>3> @>7<V@C, =01V@ DV3C@ - :V=F5289, ?>A;V4>2=VABL 28?040==O DV3C@ - 28?04:>20.  @025FL <0T 2:;040B8 DV3C@8 =0 4=> AB0:0=0 7 O:><>30 1V;LH>N 3CAB8=>N (:V;L:VABL =570?>2==8E :204@0BV2 <0T 1CB8 <V=V<0;L=>N). @8 FL><C @O4, ?>2=VABN 70?>2==89 :204@0B0<8, <0T 02B><0B8G=> 7=8:0B8 7V AB0:0=C. 204@0B8 =5 ?>28==V =0:;040B8AL >48= =0 >4=>3>.  @02FL <>65 7C?8=8B8 B0 ?@>4>268B8 3@C. V25=L 287=0G0T :V;L:VAL :204@0BV2 B0 H284:VABL =0 ?>G0B:C 3@8. 2. 5B>4 @>72'O7:C 7040GV  @>3@0<0 =0?8A0=0 =0 <>2V 0A:0;L. 8:>@8AB>2CNBLAO B0:V AB0=40@B=V <>4C;V: graph (>1@>1:8 :>4V2 =0B8A=CB8E :;02VH), graph (4;O @>1>B8 2 3@0DVG=><C 2V45>@568<V), B0 windos (28:>@8AB>2CTBLAO B09<5@).  8:>@8AB0=5 >1'T:B=> - >@VT=B>20=5 ?@>3@0<C20==O. A=>2=V >1'T:B8 - F5 DV3C@0 B0 AB0:0=.  8:>=CTBLAO >1@>1:0 ?>4V9 2V4 B09<5@0, =0B8A=CB8E :;02VH, 281@0=8E ?C=:BV2 <5=N. 3. ?8A 0;3>@8B<C INCLUDEPICTURE "http://nataliya.kiev.ua/images/pascal/14_01_ua.gif" MERGEFORMATINET 4. ?8A ?@>3@0<8  4.1. ?8A 3>;>2=8E AB@C:BC@ B0 7<V==8E ?@>3@0<8"8?V7>20=V :>=AB0=B8:V;L:VABL :;VB8=>: C AB0:0=V: maxX : byte =20; maxY : byte =30; >7<V@ >4=VTW :;VB8=:8: size : byte =12; V25=L A:;04=>ABV 287=0G0T ?>G0B:>2C H284:VABL @CEC B0 70?>2=5=VABL AB0:0=C: level : byte =1;@><V6>: G0AC <V6 ?5@5<VI==O<8 DV3C@8 2=87: speed:real=0.41'T:B8:$V3C@0: TBlock=object mx,my,x,y:byte; >>@48=0B8 DV3C@8 B0 :V;L:VABL :204@0BV2 ?> 28A>BV V H8@8=V matr:TmatrixBlock; ;5<=B <0B@8FV 4>@V2=NT >48=8FV , O:I> T :204@0B . t:byte; "8? DV3C@8 pos:1..4; >;>65==O DV3C@8 p,p2:pointer; ?>:07V2=8:8 =0 <0;N=>: :204@0B0 B0 =0 AB0= 5:@0=0 4> B>3>, O: 1C;0 =0<0;L>20=0 DV3C@0 s,s2:word; procedure initmatrix; =040==O ?0G0B:>2>3> 7=0G5==O <0B@8FV constructor init; constructor init2(t1,pos1:byte); V=VFV0;V70FVO 7 =040==O< ?>;O< t, pos 2V4?>2V4=8E 7=0G5=L. procedure rotate;virtual; ?>2>@>B DV3C@8 procedure draw;virtual; 28<0;L2C20==O DV3C@8 procedure clear;virtual; 7B8@0T DV3C@C destructor done; end;!B0:0=: Tfield=object x 1, y 1: integer ; :>>@48=0B8 ?>;O matr:TMatrixField; O:I> 2V4?>2V4=0 :><V@:0 70?>2=5=0, <VAB8BL >48=8FN constructor init(level:byte); 040==O ?>G0B:>28E 7=0G5=L 2 70;56=>ABV 2V4 @V2=O level procedure draw; 8<0;L>2C20==O AB0:0=0 procedure clear ; =8:=5==O AB0:0=C 7 5:@0=0 function full:boolean; >25@B0T true O:I> AB0:0= ?>2=89 function fline (n:byte):boolean; >25@B0T true O:I> @O4>: n ?>2=89 procedure dline (n:byte); =8ICT n- B89 @O4>: private x2,y2:integer; H8@8=0 B0 28A>B0 end; 0<:0: tramka=object x,y,width,heigth:integer; :>>@48=0B8 , H8@8=0 B0 28A>B0 lighted:boolean; /:I> true , B> @0<:0 ?V4A2VG5=0 col1,col2,col3:integer; >;L>@8 D>=C, 0:B82=>W B0 =50:B82=>W @0<:8 private p:pointer; ?>:07V2=8: =0 AB0= 5:@0=C 4> B>3>, O: 1C;> 282545=> 2V:=> s:word; 2V4?>2V4=89 @>7<V@ ?0<' OBV public constructor init( x1, y1, xx , yy :word); procedure mkactive; AB0=>2;==O 2V:=0 =0 @0<:C procedure light; V4A2VG5==O @0<:8 procedure unlight; 0<:0 =50:B82=>3> :>;L>@C procedure draw; 8<0;L>2C20==O @0<:8 procedure clear; >25@B0T :@0= 4> ?>?@54=L>3> AB0=C destructor done; end;5@B8:0;L=5 <5=N: tsubmenu=object(tramka) punkts:menutype; <0A82 7 =072 ?C=:BV2 <5=N n:byte; :V;L:VAB ?C=:BV2 col4:integer; >;V@ ?C=:BC <5=N constructor init(const pnk:menutype;n1:byte;x1,y1:word); procedure draw; function result:byte; 8:>=CT ?5@<VI==O <V6 ?C=:B0<8 B0 ?>25@B0T =><5@ >1@0=>3> ?C=:BC private h:integer; 8A>B0 >4=>3> ?C=:BC end;>@87>=B0;L=5 <5=N: tmainmenu=object(tsubmenu) constructor init(const pnk:menutype;n1:byte); procedure draw; function result:byte; procedure getkoords(i:byte;var xI,yI:word); end;  4.2. ?8A 3>;>2=8E ?@>F54C@ B0 DC=:FV9>4C;L tetobj:  procedure kv ( var p : pointer ; VAR s : word ) - ?>25@B0T ?>:07V2=8: =0 <0;N=>: :204@0B0 B0 2V4?>2V4=89 @>7<V@ ?0<'OBV>4C;L Int:  procedure drawmenu ( var res : longint ); 8:>=CT 282545==O =0 5:@0= B0 >1@>1:C <5=N.  procedure entername(score:longint;var name:string); 2545==O V<5=V 3@02FO  procedure best; 8254==O B01;8FV :@0I8E @57C;LB0BV2  procedure clearbest; G8I5==O B01;8FV @57C;LB0BV2>4C;L Game:  procedure startgame(var bl:tblock;var f:tfield;var score:integer); A=>2=0 ?@>F54C@0, O:0 28:>=CT @CE DV3C@8 ?> ?>;N, 28:;8:0T <5=N B0 >1@>1;OT @57C;LB0B8.  function fall ( const bl : tblock ; const f : tfield ): boolean ; >25@B0T 7=0G5==O True , O:I> DV3C@0 2?0;0 =0 4=> AB0:0=0.  function left(const bl:tblock; const f:tfield):boolean;  function right(const bl:tblock; const:tfield):boolean;  function CanBeRotated(const block:tblock;const field:tfield): boolean; &V DC=:FVW ?>2@B0NBL 7=0G==O true O:I> <>6;82> 28:>=0B8, 2V4?>2V4=>, @CE DV3C@8 2;V2>, 2?@02>, 01> WW ?>2>@>B .  procedure NextFigure(var t1,p1:integer); 82>48BL =0ABC?=C DV3C@C, ?>2@B0T WW B8? V ?>;>65==O  procedure OutScore(score : integer); 82>48BL @0EC=>: =0 5:@0= 5. ?8A V=B5@D59AC  VA;O 70?CA:C ?@>3@0<8 =0 5:@0=V 7'O2;ONBLAO V3@>25 ?>;5 7 DV3C@>N, V=D>@<0FVO ?@> =0ABC?=89 1;>: B0 @0EC=>:. @0 =0 ?>G0B:C 7=0E>48BAO 2 AB0=V ?0C78. 3>@V 5:@0=C - <5=N.   >;>2=5 <5=N <VAB8BL B0:V ?C=:B8:    " @0 ( Game)    " @0IV @57C;LB0B8 (Best Results)    " 0;0HBC20==O (Options)  81@0B8 =>1EV4=89 ?C=:B <>6=0 70 4>?><>3>N :;02VH-AB@V;>: B0 :;02VHV 'enter'. @8 FL><C @V4:@8TBLAO 2V4?>2V4=5 ?V4<5=N.  5=N '@0' 4>72>;OT @>7?>G0B8 =>2C 3@C, ?@>4>268B8 @>7?>G0BC, 01> 289B8 7 3@8.  5=N '@0IV @e7C;LB0B8' - ?5@53;O=CB8 B01;8FN :@0I8E @57C;LB0BV2 01> >G8B8B8 WW.  0 4>?><>3>N <5=N '0;0HBC20==O', <>6=0 7<V=8B8 @>7<V@ 5:@0=C, 01> 281@0B8 @V25=L, 7 O:>3> ?>G8=0B8 3@C. 0 ?5@H><C @V2=V =0 ?>G0B:C 3@8 AB0:0= ?CAB89. 0 =0ABC?=8E @V2=OE =09=86GV 3>@87>=B0;L=V @O48 V3@>2>3> ?>;O 70?>2=5=V.  /:I> 2 1C4L-O:89 <><=B ?V4 G0A 3@8 =0B8A=CB8 :;02VHC Esc, B> 28:;8G5BLAO <5=N. @C 1C45 ?@87C?8=5=>. 0 4>?><>3>N ?C=:BC Continue WW <>6=0 1C45 ?@>4>268B8. 6. 57C;LB0B @>1>B8 INCLUDEPICTURE "http://nataliya.kiev.ua/images/pascal/14_02.jpg" MERGEFORMATINET INCLUDEPICTURE "http://nataliya.kiev.ua/images/pascal/14_03.jpg" MERGEFORMATINET INCLUDEPICTURE "http://nataliya.kiev.ua/images/pascal/14_04.jpg" MERGEFORMATINET 7. "5:AB ?@>3@0<8program main; http://nataliya.kiev.ua uses tetobj,game,crt,graph,ramki,int; var bl:tblock;f:tfield; score:integer; s:string; procedure myinitgraph;var gd,gm:integer;begingd:=detect;initgraph(gd,gm,'c:/bp/bgi');if graphresult<>0 then begin writeln('Graphic Error');readkey;halt end;end;beginrelease(heaporg);randomize;myinitgraph;repeat startgame(bl,f,score) until 1=2;entername(score,s);CLOSEGRAPH;end. unit TetObj; http://nataliya.kiev.ua interfaceuses crt,graph;const maxX:byte=20; maxY:byte=30; size:byte=12; level:byte=1; speed:real=0.4;type TMatrixField=array[0..31,1..45]of 0..1; TMatrixBlock=array[1..4,1..4]of 0..1; TBlock=object mx,my,x,y:byte; matr:TmatrixBlock; t:byte; pos:1..4; p,p2:pointer; s,s2:word; procedure initmatrix; constructor init; constructor init2(t1,pos1:byte); procedure rotate;virtual; procedure draw;virtual; procedure


Сторінки: 1 2 3 4 5 6