Programalama > PASCAL

Etiketler: dama, oyunu

Ort. 4
Puan ver:
UNIT DAMAPF;
INTERFACE
USES CRT,DOS;
CONST
ESC=#27;
ENTER=#13;
YUKARITUS=#72;
SOLTUS=#75;
SAGTUS=#77;
ASAGITUS=#80;
DELETETUS=#83;
CTRLY=#25;
F1=#59;
TYPE
SUTSAT=1..8;
PROCEDURE DISYAZI;
procedure curon;
procedure curoff;
PROCEDURE YARDIM;
PROCEDURE RENK(Y,Z:BYTE);
PROCEDURE CERCEVE(SEK : CHAR; X1,Y1,X2,Y2,R:BYTE);
PROCEDURE MASA;
PROCEDURE BEYAZTAS;
PROCEDURE GRITAS;
PROCEDURE CIFTKOY(A,B:BYTE);
IMPLEMENTATION
VAR
I,J:BYTE;
TSU:CHAR;
procedure curon;assembler;
asm
   mov ah,01h
   mov ch,06h
   mov cl,07h
   int 10h
end;
procedure curoff;assembler;
asm
   mov ah,01h
   mov ch,20h
   int 10h
end;
PROCEDURE RENK;
BEGIN
TEXTCOLOR(Y);TEXTBACKGROUND(Z);
END;
PROCEDURE CERCEVE;
VAR
I:INTEGER;
CIZGI:STRING[80];
BEGIN
RENK(R,0);SEK:=UPCASE(SEK);
CASE SEK OF
'T':BEGIN
FILLCHAR(CIZGI,X2-X1,#196);
CIZGI[0]:=CHAR(X2-X1-1);
GOTOXY(X1,Y1);WRITE(CHR(218),CIZGI,CHR(191));
FOR I:=Y1+1 TO Y2-1 DO BEGIN
GOTOXY(X1,I);WRITELN(CHR(179));
GOTOXY(X2,I);WRITELN(CHR(179));
END;
GOTOXY(X1,Y2);WRITE(#192,CIZGI,#217);
END;
'C':BEGIN
FILLCHAR(CIZGI,X2-X1,#205);
CIZGI[0]:=CHAR(X2-X1-1);
GOTOXY(X1,Y1);WRITE(CHR(201),CIZGI,CHR(187));
FOR I:=Y1+1 TO Y2-1 DO BEGIN
GOTOXY(X1,I);WRITELN(CHR(186));
GOTOXY(X2,I);WRITELN(CHR(186));
END;
GOTOXY(X1,Y2);WRITE(CHR(200),CIZGI,CHR(188));
END;
END;
END;
PROCEDURE DISYAZI;
BEGIN
GOTOXY(6,22);WRITE('ENTER..> TAž OYNATMA');
GOTOXY(6,23);WRITE('F1.....> YARDIM');
GOTOXY(6,24);WRITE('ESC....> €IKIž');
CERCEVE('T',32,5,79,7,7);
CERCEVE('T',32,19,79,21,7);
END;
PROCEDURE YARDIM;
BEGIN CLRSCR;
CERCEVE('T',10,5,70,13,7);
GOTOXY(12,6);WRITE('DEL.....> BULUNULAN KAREN˜N ˜€˜N˜ TEM˜ZLER.');
GOTOXY(12,7);WRITE('1.......> BULUNULAN KAREYE BEYAZ TAž YERLEžT˜R˜R.');
GOTOXY(12,8);WRITE('2.......> BULUNULAN KAREYE MAV˜ TAž YERLEžT˜R˜R.');
GOTOXY(12,9);WRITE('CTLR+Y..> YEN˜ B˜R DAMA MASASI HAZIRLAR.');
GOTOXY(12,10);WRITE('ESC.....> DAMA OYUNUNDAN €IKAR.');
GOTOXY(12,12);WRITE('TAMAM ˜SE B˜R TUžA BASINIZ...');
TSU:=READKEY;
CLRSCR;
END;
PROCEDURE MASA;
BEGIN
GOTOXY(1,4);
WRITELN('       A  B  C  D  E  F  G  H ');
WRITELN('     ÚÄÄÂÄÄÂÄÄÂÄÄÂÄÄÂÄÄÂÄÄÂÄÄ¿');
WRITELN('   1 ³  ³  ³  ³  ³  ³  ³  ³  ³');
WRITELN('     ÃÄÄÅÄÄÅÄÄÅÄÄÅÄÄÅÄÄÅÄÄÅÄÄ´');
WRITELN('   2 ³  ³  ³  ³  ³  ³  ³  ³  ³');
WRITELN('     ÃÄÄÅÄÄÅÄÄÅÄÄÅÄÄÅÄÄÅÄÄÅÄÄ´');
WRITELN('   3 ³  ³  ³  ³  ³  ³  ³  ³  ³');
WRITELN('     ÃÄÄÅÄÄÅÄÄÅÄÄÅÄÄÅÄÄÅÄÄÅÄÄ´');
WRITELN('   4 ³  ³  ³  ³  ³  ³  ³  ³  ³');
WRITELN('     ÃÄÄÅÄÄÅÄÄÅÄÄÅÄÄÅÄÄÅÄÄÅÄÄ´');
WRITELN('   5 ³  ³  ³  ³  ³  ³  ³  ³  ³');
WRITELN('     ÃÄÄÅÄÄÅÄÄÅÄÄÅÄÄÅÄÄÅÄÄÅÄÄ´');
WRITELN('   6 ³  ³  ³  ³  ³  ³  ³  ³  ³');
WRITELN('     ÃÄÄÅÄÄÅÄÄÅÄÄÅÄÄÅÄÄÅÄÄÅÄÄ´');
WRITELN('   7 ³  ³  ³  ³  ³  ³  ³  ³  ³');
WRITELN('     ÃÄÄÅÄÄÅÄÄÅÄÄÅÄÄÅÄÄÅÄÄÅÄÄ´');
WRITELN('   8 ³  ³  ³  ³  ³  ³  ³  ³  ³');
WRITELN('     ÀÄÄÁÄÄÁÄÄÁÄÄÁÄÄÁÄÄÁÄÄÁÄÄÙ');
END;
PROCEDURE BEYAZTAS;
BEGIN
TEXTCOLOR(15);
WRITE('ÛÛ');
LOWVIDEO;
END;
PROCEDURE GRITAS;
BEGIN
TEXTCOLOR(LIGHTblue);
WRITE('ÛÛ');
TEXTCOLOR(15);
LOWVIDEO;
END;
PROCEDURE CIFTKOY;
BEGIN
GOTOXY(A,B);  WRITE('ÉÍÍ»');
GOTOXY(A,B+1);WRITE('º');GOTOXY(A+3,B+1);WRITE('º');
GOTOXY(A,B+2);WRITE('ÈÍͼ');
END;
END.


Yorumlar                 Yorum Yaz
Bu hazır kod'a ilk yorumu siz yapın!
KATEGORİLER
ASP - 240
ASP.NET - 24
C# - 75
C++ - 174
CGI - 8
DELPHI - 247
FLASH - 49
HTML - 536
PASCAL - 246
PERL - 11
PHP - 160
WML - 9
XML - 2
Copyright © 2002 - 2024 Hazır Kod - Tüm Hakları Saklıdır.
Siteden yararlanırken gizlilik ilkelerini okumanızı tavsiye ederiz.
hazirkod.com bir İSOBİL projesidir.