Új hozzászólás Aktív témák

  • bakaiadam

    csendes tag

    program jatek;
    uses {graph,}dos,crt;
    var vege:boolean;
    var ezelotti,gomb:char;
    var regihelyzet,helyj2,szam,szam2,szam3,regihelyzetregihely,szin,helyj,helyzet:byte;
    var g,h,b,a,fsd,fdd,szaml,hely2,hely,ido,ora,perc,masod,ms,{,a,b,}c:longint;
    procedure jatekmenet2;
    begin
    randomize;
    if (helyzet=hely2) and (helyj2=1) then vege:=true;
    hely2:=random(3);
    hely2:=hely2+10;
    end;
    procedure jatekmenet;
    begin
    randomize;
    if (helyzet=hely) and (helyj=1) then vege:=true;
    hely:=random(3);
    hely:=hely+10;
    end;
    procedure kepetfrissit;
    begin
    helyj:=helyj-1;
    helyj2:=helyj2-1;
    if helyj2=1 then clrscr;
    if helyj=1 then clrscr;
    if helyj2=1 then jatekmenet2;
    if helyj2=1 then helyj2:=10;
    if helyj=1 then jatekmenet;
    if helyj=1 then helyj:=10;
    if hely=10 then jatekmenet;
    if hely2=10 then jatekmenet2;
    gotoxy(hely,helyj+1);
    textcolor(black);
    write('ţ');
    gotoxy(hely2,helyj2+1);
    write('ţ');
    gotoxy(helyzet,1);
    textcolor(red);
    write('|');
    textcolor(green);
    gotoxy(hely,helyj);
    write('1');
    gotoxy(hely2,helyj2);
    write('2');
    end;
    procedure idozit;
    begin
    gettime(g,h,b,a);
    ido:=b;
    {if b<59 then ido:=b+1;
    if b=59 then ido:=1;}
    repeat
    gettime(g,h,b,a);
    gomb:='0';
    repeat
    if ido<>b then readkey;
    until readkey<>'0';
    if readkey<>'0' then gomb:='a';
    ezelotti:=readkey;
    if readkey='d' then gomb:='d';
    if readkey='a' then gomb:='a';
    if readkey='s' then gomb:='s';
    if gomb='d'then helyzet:=12;
    if gomb='a'then helyzet:=10;
    if gomb='s' then helyzet:=11;
    gotoxy(11,1);
    write(' ');
    gotoxy(12,1);
    write(' ');
    gotoxy(10,1);
    write(' ');
    gotoxy(helyzet,1);
    textcolor(red);
    write('ţ');
    until {((gomb<>'0') and (ezelotti<>readkey) or} ido<b;
    end;
    procedure kepetfrissit1;
    begin
    helyj:=10;
    helyj2:=14;
    gotoxy(hely,helyj+1);
    textcolor(black);
    write(' ');
    gotoxy(hely2,helyj2+1);
    write(' ');
    gotoxy(helyzet,1);
    textcolor(red);
    write('|');
    textcolor(green);
    gotoxy(hely,helyj);
    write('|');
    gotoxy(hely2,helyj2);
    write('|');

    end;
    begin
    hely:=11;
    hely2:=12;
    helyj:=10;
    helyj2:=14;
    jatekmenet;
    jatekmenet2;
    repeat
    szaml:=szaml+1;
    idozit;
    kepetfrissit;
    until vege=true;
    end.
    Mit szóltok hozzá?Csak az a fránya readkey meg lenne oldva

Új hozzászólás Aktív témák