Dze je subor www.TrSek.com/cover/gloger/tuxtype.pas{ HADAJ_CISLO.PAS Copyright (c) Michael Gloger }
{ Program generuje nahodne cisla od 1 po 9, ktore padaju smerom na }
{ dol. Vasou ulohou je stlacat dane cisla na numerickej klavesnici }
{ pred tym ako padnu. Rychlost a pocet bodov za <spravne> stlacene }
{ tlacitko sa postupne zvysuje. }
{ }
{ Datum:13.01.2007 http://www.trsek.com }
program tuxtype;
uses crt;
var x,y,c,skore:integer;
z:char;
del:integer;
begin
writeln(' (C) Michael Gloger');
writeln('');
Writeln('Program generuje nahodne cisla od 1 po 9, ktore padaju smerom na dol');
Writeln('Vasou ulohou je stlacat dane cisla na numerickej klavesnici pred tym ako padnu.');
writeln('Rychlost a pocet bodov za <spravne> stlacene tlacitko sa postupne zvysuje.');
textcolor(yellow);
writeln('');
writeln('Stlac akukolvek klavesu');
textcolor(lightgray);
if keypressed then z:=readkey;
if(ord(z)-ord('0')=c)then
begin
if (del<=300) and (del>200) then skore:=skore+1;
if (del<=200) and (del>100) then skore:=skore+3;
if (del<=100) and (del>0) then skore:=skore+7;
end
until (ord(z)-ord('0')=c) or (y=26);
until (y=26);
textcolor(yellow);
gotoxy(20,13);
if (skore>=5) or (skore=0) then write('Ziskal si ', skore ,' bodov');
if (skore<5) and (skore>0) then write('Ziskal si ', skore ,' body');