- 24 Tháng mười 2020
- 5
- 9
- 21
- 17
- Thừa Thiên Huế
- Trương THCS Vinh Thanh
Chắc suất Đại học top - Giữ chỗ ngay!! ĐĂNG BÀI NGAY để cùng trao đổi với các thành viên siêu nhiệt tình & dễ thương trên diễn đàn.
mình mất cả buổi tối mới làm được game này...
code:
program flappy_bird;
uses crt;
var a,b,c,d:integer;
var e,f,g,h:integer;
var j,k,x,y:integer;
var z,u,i,o:integer;
var p,q,r,n,m:integer;
var v,w,t,l:integer;
var ketthuc,rd:integer;
var tttime,ttkey,diem:integer;
var ch :char;
begin
clrscr;
writeln('so 6 la ong tre;so 1 la noi trong;so 8 la nhan vat;');
writeln('cach choi: nhan phim sang trai de di chuyen nhan vat');
writeln('game duoc lap trinh boi phuc');
writeln('nhan enter de tiep tuc');
readln;
diem:=0;
tttime:=4;
ttkey:=0;
ketthuc:=0;
a:=1;
b:=1;
c:=1;
d:=1;
e:=1;
f:=1;
g:=1;
h:=1;
j:=1;
k:=1;
x:=1;
y:=1;
z:=1;
u:=1;
i:=1;
o:=1;
p:=1;
q:=1;
r:=1;
n:=1;
m:=1;
v:=1;
w:=1;
t:=1;
l:=1;
if KeyPressed then
begin
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
end;
if (ttkey=1) then begin
if (tttime=5) then else tttime:=tttime+1;
end else
if (tttime=1) then else tttime:=tttime-1;
ttkey:=0;
if (tttime=1) then begin
b:=1;
g:=1;
y:=1;
p:=1;
v:=8;
end;
if (tttime=2) then begin
b:=1;
g:=1;
y:=1;
p:=8;
v:=1;
end;
if (tttime=3) then begin
b:=1;
g:=1;
y:=8;
p:=1;
v:=1;
end;
if (tttime=4) then begin
b:=1;
g:=8;
y:=1;
p:=1;
v:=1;
end;
if (tttime=5) then begin
b:=8;
g:=1;
y:=1;
p:=1;
v:=1;
end;
delay(600);
clrscr;
write(a);
write(b);
write(c);
write(d);
writeln(e);
write(f);
write(g);
write(h);
write(j);
writeln(k);
write(x);
write(y);
write(z);
write(u);
writeln(i);
write(o);
write(p);
write(q);
write(r);
writeln(n);
write(m);
write(v);
write(w);
write(t);
writeln(l);
if KeyPressed then
begin
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
end;
if (ttkey=1) then begin
if (tttime=5) then else tttime:=tttime+1;
end else
if (tttime=1) then else tttime:=tttime-1;
ttkey:=0;
if (tttime=1) then begin
b:=1;
g:=1;
y:=1;
p:=1;
v:=8;
end;
if (tttime=2) then begin
b:=1;
g:=1;
y:=1;
p:=8;
v:=1;
end;
if (tttime=3) then begin
b:=1;
g:=1;
y:=8;
p:=1;
v:=1;
end;
if (tttime=4) then begin
b:=1;
g:=8;
y:=1;
p:=1;
v:=1;
end;
if (tttime=5) then begin
b:=8;
g:=1;
y:=1;
p:=1;
v:=1;
end;
delay(600);
clrscr;
writeln ('diem cua ban la:',diem);
write(a);
write(b);
write(c);
write(d);
writeln(e);
write(f);
write(g);
write(h);
write(j);
writeln(k);
write(x);
write(y);
write(z);
write(u);
writeln(i);
write(o);
write(p);
write(q);
write(r);
writeln(n);
write(m);
write(v);
write(w);
write(t);
writeln(l);
if KeyPressed then
begin
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
end;
if (ttkey=1) then begin
if (tttime=5) then else tttime:=tttime+1;
end else
if (tttime=1) then else tttime:=tttime-1;
ttkey:=0;
if (tttime=1) then begin
b:=1;
g:=1;
y:=1;
p:=1;
v:=8;
end;
if (tttime=2) then begin
b:=1;
if KeyPressed then
begin
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
end;
if (ttkey=1) then begin
if (tttime=5) then else tttime:=tttime+1;
end else
if (tttime=1) then else tttime:=tttime-1;
ttkey:=0;
if (tttime=1) then begin
b:=1;
g:=1;
y:=1;
p:=1;
v:=8;
end;
if (tttime=2) then begin
b:=1;
g:=1;
y:=1;
p:=8;
v:=1;
end;
if (tttime=3) then begin
b:=1;
g:=1;
y:=8;
p:=1;
v:=1;
end;
if (tttime=4) then begin
b:=1;
g:=8;
y:=1;
p:=1;
v:=1;
end;
if (tttime=5) then begin
b:=8;
g:=1;
y:=1;
p:=1;
v:=1;
end;
y:=1;
p:=8;
v:=1;
end;
if (tttime=3) then begin
b:=1;
g:=1;
y:=8;
p:=1;
v:=1;
end;
if (tttime=4) then begin
b:=1;
g:=8;
y:=1;
p:=1;
v:=1;
end;
if (tttime=5) then begin
b:=8;
g:=1;
y:=1;
p:=1;
v:=1;
end;
delay(600);
clrscr;
writeln ('diem cua ban la:',diem);
write(a);
write(b);
write(c);
write(d);
writeln(e);
write(f);
write(g);
write(h);
write(j);
writeln(k);
write(x);
write(y);
write(z);
write(u);
writeln(i);
write(o);
write(p);
write(q);
write(r);
writeln(n);
write(m);
write(v);
write(w);
write(t);
writeln(l);
if KeyPressed then
begin
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
end;
if (ttkey=1) then begin
if (tttime=5) then else tttime:=tttime+1;
end else
if (tttime=1) then else tttime:=tttime-1;
ttkey:=0;
if (tttime=1) then begin
b:=1;
g:=1;
y:=1;
p:=1;
v:=8;
end;
if (tttime=2) then begin
b:=1;
g:=1;
y:=1;
p:=8;
v:=1;
end;
if (tttime=3) then begin
b:=1;
g:=1;
y:=8;
p:=1;
v:=1;
end;
if (tttime=4) then begin
b:=1;
g:=8;
y:=1;
p:=1;
v:=1;
end;
if (tttime=5) then begin
b:=8;
g:=1;
y:=1;
p:=1;
v:=1;
end;
delay(600);
clrscr;
writeln ('diem cua ban la:',diem);
write(a);
write(b);
write(c);
write(d);
writeln(e);
write(f);
write(g);
write(h);
write(j);
writeln(k);
write(x);
write(y);
write(z);
write(u);
writeln(i);
write(o);
write(p);
write(q);
write(r);
writeln(n);
write(m);
write(v);
write(w);
write(t);
writeln(l);
repeat
rd:=random(4);
if (rd=0) then begin
e:=1;
k:=1;
i:=6;
n:=6;
l:=6;
end;
if (rd=1) then begin
e:=6;
k:=1;
i:=1;
n:=6;
l:=6;
end;
if (rd=2) then begin
e:=6;
k:=6;
i:=1;
n:=1;
l:=6;
end;
if (rd=3) then begin
e:=6;
k:=6;
i:=6;
n:=1;
l:=1;
end;
clrscr;
writeln ('diem cua ban la:',diem);
write(a);
write(b);
write(c);
write(d);
writeln(e);
write(f);
write(g);
write(h);
write(j);
writeln(k);
write(x);
write(y);
write(z);
write(u);
writeln(i);
write(o);
write(p);
write(q);
write(r);
writeln(n);
write(m);
write(v);
write(w);
write(t);
writeln(l);
delay(550-diem*10);
if KeyPressed then
begin
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
end;
if (ttkey=1) then begin
if (tttime=5) then else tttime:=tttime+1;
end else
if (tttime=1) then else tttime:=tttime-1;
ttkey:=0;
if (tttime=1) then begin
b:=1;
g:=1;
y:=1;
p:=1;
v:=8;
end;
if (tttime=2) then begin
b:=1;
g:=1;
y:=1;
p:=8;
v:=1;
end;
if (tttime=3) then begin
b:=1;
g:=1;
y:=8;
p:=1;
v:=1;
end;
if (tttime=4) then begin
b:=1;
g:=8;
y:=1;
p:=1;
v:=1;
end;
if (tttime=5) then begin
b:=8;
g:=1;
y:=1;
p:=1;
v:=1;
end;
e:=1;
k:=1;
i:=1;
n:=1;
l:=1;
if (rd=0) then begin
d:=1;
j:=1;
u:=6;
r:=6;
t:=6;
end;
if (rd=1) then begin
d:=6;
j:=1;
u:=1;
r:=6;
t:=6;
end;
if (rd=2) then begin
d:=6;
j:=6;
u:=1;
r:=1;
t:=6;
end;
if (rd=3) then begin
d:=6;
j:=6;
u:=6;
r:=1;
t:=1;
end;
clrscr;writeln ('diem cua ban la:',diem);
write(a);
write(b);
write(c);
write(d);
writeln(e);
write(f);
write(g);
write(h);
write(j);
writeln(k);
write(x);
write(y);
write(z);
write(u);
writeln(i);
write(o);
write(p);
write(q);
write(r);
writeln(n);
write(m);
write(v);
write(w);
write(t);
writeln(l);
delay(550-diem*10);
if KeyPressed then
begin
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
end;
if (ttkey=1) then begin
if (tttime=5) then else tttime:=tttime+1;
end else
if (tttime=1) then else tttime:=tttime-1;
ttkey:=0;
if (tttime=1) then begin
b:=1;
g:=1;
y:=1;
p:=1;
v:=8;
end;
if (tttime=2) then begin
b:=1;
g:=1;
y:=1;
p:=8;
v:=1;
end;
if (tttime=3) then begin
b:=1;
g:=1;
y:=8;
p:=1;
v:=1;
end;
if (tttime=4) then begin
b:=1;
g:=8;
y:=1;
p:=1;
v:=1;
end;
if (tttime=5) then begin
b:=8;
g:=1;
y:=1;
p:=1;
v:=1;
end;
d:=1;
j:=1;
u:=1;
r:=1;
t:=1;
if (rd=0) then begin
c:=1;
h:=1;
z:=6;
q:=6;
w:=6;
end;
if (rd=1) then begin
c:=6;
h:=1;
z:=1;
q:=6;
w:=6;
end;
if (rd=2) then begin
c:=6;
h:=6;
z:=1;
q:=1;
w:=6;
end;
if (rd=3) then begin
c:=6;
h:=6;
z:=6;
q:=1;
w:=1;
end;
clrscr;writeln ('diem cua ban la:',diem);
write(a);
write(b);
write(c);
write(d);
writeln(e);
write(f);
write(g);
write(h);
write(j);
writeln(k);
write(x);
write(y);
write(z);
write(u);
writeln(i);
write(o);
write(p);
write(q);
write(r);
writeln(n);
write(m);
write(v);
write(w);
write(t);
writeln(l);
delay(550-diem*10);
if KeyPressed then
begin
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
end;
if (ttkey=1) then begin
if (tttime=5) then else tttime:=tttime+1;
end else
if (tttime=1) then else tttime:=tttime-1;
ttkey:=0;
if (tttime=1) then begin
b:=1;
g:=1;
y:=1;
p:=1;
v:=8;
end;
if (tttime=2) then begin
b:=1;
g:=1;
y:=1;
p:=8;
v:=1;
end;
if (tttime=3) then begin
b:=1;
g:=1;
y:=8;
p:=1;
v:=1;
end;
if (tttime=4) then begin
b:=1;
g:=8;
y:=1;
p:=1;
v:=1;
end;
if (tttime=5) then begin
b:=8;
g:=1;
y:=1;
p:=1;
v:=1;
end;
c:=1;
h:=1;
z:=1;
q:=1;
w:=1;
if (rd=0) then begin
if (tttime=1) then begin
b:=1;
g:=1;
y:=6;
p:=6;
v:=8;
ketthuc:=1;
end;
if (tttime=2) then begin
b:=1;
g:=1;
y:=6;
p:=8;
v:=6;
ketthuc:=1;
end;
if (tttime=3) then begin
b:=1;
g:=1;
y:=8;
p:=6;
v:=6;
ketthuc:=1;
end;
if (tttime=4) then begin
b:=1;
g:=8;
y:=6;
p:=6;
v:=6;
end;
if (tttime=5) then begin
b:=8;
g:=1;
y:=6;
p:=6;
v:=6;
end;
end;
if (rd=1) then begin
if (tttime=1) then begin
b:=6;
g:=1;
y:=1;
p:=6;
v:=8;
ketthuc:=1;
end;
if (tttime=2) then begin
b:=6;
g:=1;
y:=1;
p:=8;
v:=6;
ketthuc:=1;
end;
if (tttime=3) then begin
b:=6;
g:=1;
y:=8;
p:=6;
v:=6;
end;
if (tttime=4) then begin
b:=6;
g:=8;
y:=1;
p:=6;
v:=6;
end;
if (tttime=5) then begin
b:=8;
g:=1;
y:=1;
p:=6;
v:=6;
ketthuc:=1;
end;
end;
if (rd=2) then begin
if (tttime=1) then begin
b:=6;
g:=6;
y:=1;
p:=1;
v:=8;
ketthuc:=1;
end;
if (tttime=2) then begin
b:=6;
g:=6;
y:=1;
p:=8;
v:=6;
end;
if (tttime=3) then begin
b:=6;
g:=6;
y:=8;
p:=1;
v:=6;
end;
if (tttime=4) then begin
b:=6;
g:=8;
y:=1;
p:=1;
v:=6;
ketthuc:=1;
end;
if (tttime=5) then begin
b:=8;
g:=6;
y:=1;
p:=1;
v:=6;
ketthuc:=1;
end;
end;
if (rd=3) then begin
if (tttime=1) then begin
b:=6;
g:=6;
y:=6;
p:=1;
v:=8;
end;
if (tttime=2) then begin
b:=6;
g:=6;
y:=6;
p:=8;
v:=1;
end;
if (tttime=3) then begin
b:=6;
g:=6;
y:=8;
p:=1;
v:=1;
ketthuc:=1;
end;
if (tttime=4) then begin
b:=6;
g:=8;
y:=6;
p:=1;
v:=1;
ketthuc:=1;
end;
if (tttime=5) then begin
b:=8;
g:=6;
y:=6;
p:=1;
v:=1;
ketthuc:=1;
end;
end;
clrscr;writeln ('diem cua ban la:',diem);
write(a);
write(b);
write(c);
write(d);
writeln(e);
write(f);
write(g);
write(h);
write(j);
writeln(k);
write(x);
write(y);
write(z);
write(u);
writeln(i);
write(o);
write(p);
write(q);
write(r);
writeln(n);
write(m);
write(v);
write(w);
write(t);
writeln(l);
delay(550-diem*10);
diem:=diem+1;
if (ketthuc=0) then begin
if KeyPressed then
begin
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
end;
if (ttkey=1) then begin
if (tttime=5) then else tttime:=tttime+1;
end else
if (tttime=1) then else tttime:=tttime-1;
ttkey:=0;
if (tttime=1) then begin
b:=1;
g:=1;
y:=1;
p:=1;
v:=8;
end;
if (tttime=2) then begin
b:=1;
g:=1;
y:=1;
p:=8;
v:=1;
end;
if (tttime=3) then begin
b:=1;
g:=1;
y:=8;
p:=1;
v:=1;
end;
if (tttime=4) then begin
b:=1;
g:=8;
y:=1;
p:=1;
v:=1;
end;
if (tttime=5) then begin
b:=8;
g:=1;
y:=1;
p:=1;
v:=1;
end;
if (rd=0) then begin
a:=1;
f:=1;
x:=6;
o:=6;
m:=6;
end;
if (rd=1) then begin
a:=6;
f:=1;
x:=1;
o:=6;
m:=6;
end;
if (rd=2) then begin
a:=6;
f:=6;
x:=1;
o:=1;
m:=6;
end;
if (rd=3) then begin
a:=6;
f:=6;
x:=6;
o:=1;
m:=1;
end;
clrscr;writeln ('diem cua ban la:',diem);
write(a);
write(b);
write(c);
write(d);
writeln(e);
write(f);
write(g);
write(h);
write(j);
writeln(k);
write(x);
write(y);
write(z);
write(u);
writeln(i);
write(o);
write(p);
write(q);
write(r);
writeln(n);
write(m);
write(v);
write(w);
write(t);
writeln(l);
delay(550-diem*10);
if KeyPressed then
begin
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
end;
if (ttkey=1) then begin
if (tttime=5) then else tttime:=tttime+1;
end else
if (tttime=1) then else tttime:=tttime-1;
ttkey:=0;
if (tttime=1) then begin
b:=1;
g:=1;
y:=1;
p:=1;
v:=8;
end;
if (tttime=2) then begin
b:=1;
g:=1;
y:=1;
p:=8;
v:=1;
end;
if (tttime=3) then begin
b:=1;
g:=1;
y:=8;
p:=1;
v:=1;
end;
if (tttime=4) then begin
b:=1;
g:=8;
y:=1;
p:=1;
v:=1;
end;
if (tttime=5) then begin
b:=8;
g:=1;
y:=1;
p:=1;
v:=1;
end;
a:=1;
f:=1;
x:=1;
o:=1;
m:=1;
clrscr;
writeln ('diem cua ban la:',diem);
write(a);
write(b);
write(c);
write(d);
writeln(e);
write(f);
write(g);
write(h);
write(j);
writeln(k);
write(x);
write(y);
write(z);
write(u);
writeln(i);
write(o);
write(p);
write(q);
write(r);
writeln(n);
write(m);
write(v);
write(w);
write(t);
writeln(l);
end;
until ketthuc=1;
writeln('game over');
writeln('game duoc lap trinh boi phuc');
readln;
end.
code:
program flappy_bird;
uses crt;
var a,b,c,d:integer;
var e,f,g,h:integer;
var j,k,x,y:integer;
var z,u,i,o:integer;
var p,q,r,n,m:integer;
var v,w,t,l:integer;
var ketthuc,rd:integer;
var tttime,ttkey,diem:integer;
var ch :char;
begin
clrscr;
writeln('so 6 la ong tre;so 1 la noi trong;so 8 la nhan vat;');
writeln('cach choi: nhan phim sang trai de di chuyen nhan vat');
writeln('game duoc lap trinh boi phuc');
writeln('nhan enter de tiep tuc');
readln;
diem:=0;
tttime:=4;
ttkey:=0;
ketthuc:=0;
a:=1;
b:=1;
c:=1;
d:=1;
e:=1;
f:=1;
g:=1;
h:=1;
j:=1;
k:=1;
x:=1;
y:=1;
z:=1;
u:=1;
i:=1;
o:=1;
p:=1;
q:=1;
r:=1;
n:=1;
m:=1;
v:=1;
w:=1;
t:=1;
l:=1;
if KeyPressed then
begin
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
end;
if (ttkey=1) then begin
if (tttime=5) then else tttime:=tttime+1;
end else
if (tttime=1) then else tttime:=tttime-1;
ttkey:=0;
if (tttime=1) then begin
b:=1;
g:=1;
y:=1;
p:=1;
v:=8;
end;
if (tttime=2) then begin
b:=1;
g:=1;
y:=1;
p:=8;
v:=1;
end;
if (tttime=3) then begin
b:=1;
g:=1;
y:=8;
p:=1;
v:=1;
end;
if (tttime=4) then begin
b:=1;
g:=8;
y:=1;
p:=1;
v:=1;
end;
if (tttime=5) then begin
b:=8;
g:=1;
y:=1;
p:=1;
v:=1;
end;
delay(600);
clrscr;
write(a);
write(b);
write(c);
write(d);
writeln(e);
write(f);
write(g);
write(h);
write(j);
writeln(k);
write(x);
write(y);
write(z);
write(u);
writeln(i);
write(o);
write(p);
write(q);
write(r);
writeln(n);
write(m);
write(v);
write(w);
write(t);
writeln(l);
if KeyPressed then
begin
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
end;
if (ttkey=1) then begin
if (tttime=5) then else tttime:=tttime+1;
end else
if (tttime=1) then else tttime:=tttime-1;
ttkey:=0;
if (tttime=1) then begin
b:=1;
g:=1;
y:=1;
p:=1;
v:=8;
end;
if (tttime=2) then begin
b:=1;
g:=1;
y:=1;
p:=8;
v:=1;
end;
if (tttime=3) then begin
b:=1;
g:=1;
y:=8;
p:=1;
v:=1;
end;
if (tttime=4) then begin
b:=1;
g:=8;
y:=1;
p:=1;
v:=1;
end;
if (tttime=5) then begin
b:=8;
g:=1;
y:=1;
p:=1;
v:=1;
end;
delay(600);
clrscr;
writeln ('diem cua ban la:',diem);
write(a);
write(b);
write(c);
write(d);
writeln(e);
write(f);
write(g);
write(h);
write(j);
writeln(k);
write(x);
write(y);
write(z);
write(u);
writeln(i);
write(o);
write(p);
write(q);
write(r);
writeln(n);
write(m);
write(v);
write(w);
write(t);
writeln(l);
if KeyPressed then
begin
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
end;
if (ttkey=1) then begin
if (tttime=5) then else tttime:=tttime+1;
end else
if (tttime=1) then else tttime:=tttime-1;
ttkey:=0;
if (tttime=1) then begin
b:=1;
g:=1;
y:=1;
p:=1;
v:=8;
end;
if (tttime=2) then begin
b:=1;
if KeyPressed then
begin
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
end;
if (ttkey=1) then begin
if (tttime=5) then else tttime:=tttime+1;
end else
if (tttime=1) then else tttime:=tttime-1;
ttkey:=0;
if (tttime=1) then begin
b:=1;
g:=1;
y:=1;
p:=1;
v:=8;
end;
if (tttime=2) then begin
b:=1;
g:=1;
y:=1;
p:=8;
v:=1;
end;
if (tttime=3) then begin
b:=1;
g:=1;
y:=8;
p:=1;
v:=1;
end;
if (tttime=4) then begin
b:=1;
g:=8;
y:=1;
p:=1;
v:=1;
end;
if (tttime=5) then begin
b:=8;
g:=1;
y:=1;
p:=1;
v:=1;
end;
y:=1;
p:=8;
v:=1;
end;
if (tttime=3) then begin
b:=1;
g:=1;
y:=8;
p:=1;
v:=1;
end;
if (tttime=4) then begin
b:=1;
g:=8;
y:=1;
p:=1;
v:=1;
end;
if (tttime=5) then begin
b:=8;
g:=1;
y:=1;
p:=1;
v:=1;
end;
delay(600);
clrscr;
writeln ('diem cua ban la:',diem);
write(a);
write(b);
write(c);
write(d);
writeln(e);
write(f);
write(g);
write(h);
write(j);
writeln(k);
write(x);
write(y);
write(z);
write(u);
writeln(i);
write(o);
write(p);
write(q);
write(r);
writeln(n);
write(m);
write(v);
write(w);
write(t);
writeln(l);
if KeyPressed then
begin
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
end;
if (ttkey=1) then begin
if (tttime=5) then else tttime:=tttime+1;
end else
if (tttime=1) then else tttime:=tttime-1;
ttkey:=0;
if (tttime=1) then begin
b:=1;
g:=1;
y:=1;
p:=1;
v:=8;
end;
if (tttime=2) then begin
b:=1;
g:=1;
y:=1;
p:=8;
v:=1;
end;
if (tttime=3) then begin
b:=1;
g:=1;
y:=8;
p:=1;
v:=1;
end;
if (tttime=4) then begin
b:=1;
g:=8;
y:=1;
p:=1;
v:=1;
end;
if (tttime=5) then begin
b:=8;
g:=1;
y:=1;
p:=1;
v:=1;
end;
delay(600);
clrscr;
writeln ('diem cua ban la:',diem);
write(a);
write(b);
write(c);
write(d);
writeln(e);
write(f);
write(g);
write(h);
write(j);
writeln(k);
write(x);
write(y);
write(z);
write(u);
writeln(i);
write(o);
write(p);
write(q);
write(r);
writeln(n);
write(m);
write(v);
write(w);
write(t);
writeln(l);
repeat
rd:=random(4);
if (rd=0) then begin
e:=1;
k:=1;
i:=6;
n:=6;
l:=6;
end;
if (rd=1) then begin
e:=6;
k:=1;
i:=1;
n:=6;
l:=6;
end;
if (rd=2) then begin
e:=6;
k:=6;
i:=1;
n:=1;
l:=6;
end;
if (rd=3) then begin
e:=6;
k:=6;
i:=6;
n:=1;
l:=1;
end;
clrscr;
writeln ('diem cua ban la:',diem);
write(a);
write(b);
write(c);
write(d);
writeln(e);
write(f);
write(g);
write(h);
write(j);
writeln(k);
write(x);
write(y);
write(z);
write(u);
writeln(i);
write(o);
write(p);
write(q);
write(r);
writeln(n);
write(m);
write(v);
write(w);
write(t);
writeln(l);
delay(550-diem*10);
if KeyPressed then
begin
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
end;
if (ttkey=1) then begin
if (tttime=5) then else tttime:=tttime+1;
end else
if (tttime=1) then else tttime:=tttime-1;
ttkey:=0;
if (tttime=1) then begin
b:=1;
g:=1;
y:=1;
p:=1;
v:=8;
end;
if (tttime=2) then begin
b:=1;
g:=1;
y:=1;
p:=8;
v:=1;
end;
if (tttime=3) then begin
b:=1;
g:=1;
y:=8;
p:=1;
v:=1;
end;
if (tttime=4) then begin
b:=1;
g:=8;
y:=1;
p:=1;
v:=1;
end;
if (tttime=5) then begin
b:=8;
g:=1;
y:=1;
p:=1;
v:=1;
end;
e:=1;
k:=1;
i:=1;
n:=1;
l:=1;
if (rd=0) then begin
d:=1;
j:=1;
u:=6;
r:=6;
t:=6;
end;
if (rd=1) then begin
d:=6;
j:=1;
u:=1;
r:=6;
t:=6;
end;
if (rd=2) then begin
d:=6;
j:=6;
u:=1;
r:=1;
t:=6;
end;
if (rd=3) then begin
d:=6;
j:=6;
u:=6;
r:=1;
t:=1;
end;
clrscr;writeln ('diem cua ban la:',diem);
write(a);
write(b);
write(c);
write(d);
writeln(e);
write(f);
write(g);
write(h);
write(j);
writeln(k);
write(x);
write(y);
write(z);
write(u);
writeln(i);
write(o);
write(p);
write(q);
write(r);
writeln(n);
write(m);
write(v);
write(w);
write(t);
writeln(l);
delay(550-diem*10);
if KeyPressed then
begin
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
end;
if (ttkey=1) then begin
if (tttime=5) then else tttime:=tttime+1;
end else
if (tttime=1) then else tttime:=tttime-1;
ttkey:=0;
if (tttime=1) then begin
b:=1;
g:=1;
y:=1;
p:=1;
v:=8;
end;
if (tttime=2) then begin
b:=1;
g:=1;
y:=1;
p:=8;
v:=1;
end;
if (tttime=3) then begin
b:=1;
g:=1;
y:=8;
p:=1;
v:=1;
end;
if (tttime=4) then begin
b:=1;
g:=8;
y:=1;
p:=1;
v:=1;
end;
if (tttime=5) then begin
b:=8;
g:=1;
y:=1;
p:=1;
v:=1;
end;
d:=1;
j:=1;
u:=1;
r:=1;
t:=1;
if (rd=0) then begin
c:=1;
h:=1;
z:=6;
q:=6;
w:=6;
end;
if (rd=1) then begin
c:=6;
h:=1;
z:=1;
q:=6;
w:=6;
end;
if (rd=2) then begin
c:=6;
h:=6;
z:=1;
q:=1;
w:=6;
end;
if (rd=3) then begin
c:=6;
h:=6;
z:=6;
q:=1;
w:=1;
end;
clrscr;writeln ('diem cua ban la:',diem);
write(a);
write(b);
write(c);
write(d);
writeln(e);
write(f);
write(g);
write(h);
write(j);
writeln(k);
write(x);
write(y);
write(z);
write(u);
writeln(i);
write(o);
write(p);
write(q);
write(r);
writeln(n);
write(m);
write(v);
write(w);
write(t);
writeln(l);
delay(550-diem*10);
if KeyPressed then
begin
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
end;
if (ttkey=1) then begin
if (tttime=5) then else tttime:=tttime+1;
end else
if (tttime=1) then else tttime:=tttime-1;
ttkey:=0;
if (tttime=1) then begin
b:=1;
g:=1;
y:=1;
p:=1;
v:=8;
end;
if (tttime=2) then begin
b:=1;
g:=1;
y:=1;
p:=8;
v:=1;
end;
if (tttime=3) then begin
b:=1;
g:=1;
y:=8;
p:=1;
v:=1;
end;
if (tttime=4) then begin
b:=1;
g:=8;
y:=1;
p:=1;
v:=1;
end;
if (tttime=5) then begin
b:=8;
g:=1;
y:=1;
p:=1;
v:=1;
end;
c:=1;
h:=1;
z:=1;
q:=1;
w:=1;
if (rd=0) then begin
if (tttime=1) then begin
b:=1;
g:=1;
y:=6;
p:=6;
v:=8;
ketthuc:=1;
end;
if (tttime=2) then begin
b:=1;
g:=1;
y:=6;
p:=8;
v:=6;
ketthuc:=1;
end;
if (tttime=3) then begin
b:=1;
g:=1;
y:=8;
p:=6;
v:=6;
ketthuc:=1;
end;
if (tttime=4) then begin
b:=1;
g:=8;
y:=6;
p:=6;
v:=6;
end;
if (tttime=5) then begin
b:=8;
g:=1;
y:=6;
p:=6;
v:=6;
end;
end;
if (rd=1) then begin
if (tttime=1) then begin
b:=6;
g:=1;
y:=1;
p:=6;
v:=8;
ketthuc:=1;
end;
if (tttime=2) then begin
b:=6;
g:=1;
y:=1;
p:=8;
v:=6;
ketthuc:=1;
end;
if (tttime=3) then begin
b:=6;
g:=1;
y:=8;
p:=6;
v:=6;
end;
if (tttime=4) then begin
b:=6;
g:=8;
y:=1;
p:=6;
v:=6;
end;
if (tttime=5) then begin
b:=8;
g:=1;
y:=1;
p:=6;
v:=6;
ketthuc:=1;
end;
end;
if (rd=2) then begin
if (tttime=1) then begin
b:=6;
g:=6;
y:=1;
p:=1;
v:=8;
ketthuc:=1;
end;
if (tttime=2) then begin
b:=6;
g:=6;
y:=1;
p:=8;
v:=6;
end;
if (tttime=3) then begin
b:=6;
g:=6;
y:=8;
p:=1;
v:=6;
end;
if (tttime=4) then begin
b:=6;
g:=8;
y:=1;
p:=1;
v:=6;
ketthuc:=1;
end;
if (tttime=5) then begin
b:=8;
g:=6;
y:=1;
p:=1;
v:=6;
ketthuc:=1;
end;
end;
if (rd=3) then begin
if (tttime=1) then begin
b:=6;
g:=6;
y:=6;
p:=1;
v:=8;
end;
if (tttime=2) then begin
b:=6;
g:=6;
y:=6;
p:=8;
v:=1;
end;
if (tttime=3) then begin
b:=6;
g:=6;
y:=8;
p:=1;
v:=1;
ketthuc:=1;
end;
if (tttime=4) then begin
b:=6;
g:=8;
y:=6;
p:=1;
v:=1;
ketthuc:=1;
end;
if (tttime=5) then begin
b:=8;
g:=6;
y:=6;
p:=1;
v:=1;
ketthuc:=1;
end;
end;
clrscr;writeln ('diem cua ban la:',diem);
write(a);
write(b);
write(c);
write(d);
writeln(e);
write(f);
write(g);
write(h);
write(j);
writeln(k);
write(x);
write(y);
write(z);
write(u);
writeln(i);
write(o);
write(p);
write(q);
write(r);
writeln(n);
write(m);
write(v);
write(w);
write(t);
writeln(l);
delay(550-diem*10);
diem:=diem+1;
if (ketthuc=0) then begin
if KeyPressed then
begin
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
end;
if (ttkey=1) then begin
if (tttime=5) then else tttime:=tttime+1;
end else
if (tttime=1) then else tttime:=tttime-1;
ttkey:=0;
if (tttime=1) then begin
b:=1;
g:=1;
y:=1;
p:=1;
v:=8;
end;
if (tttime=2) then begin
b:=1;
g:=1;
y:=1;
p:=8;
v:=1;
end;
if (tttime=3) then begin
b:=1;
g:=1;
y:=8;
p:=1;
v:=1;
end;
if (tttime=4) then begin
b:=1;
g:=8;
y:=1;
p:=1;
v:=1;
end;
if (tttime=5) then begin
b:=8;
g:=1;
y:=1;
p:=1;
v:=1;
end;
if (rd=0) then begin
a:=1;
f:=1;
x:=6;
o:=6;
m:=6;
end;
if (rd=1) then begin
a:=6;
f:=1;
x:=1;
o:=6;
m:=6;
end;
if (rd=2) then begin
a:=6;
f:=6;
x:=1;
o:=1;
m:=6;
end;
if (rd=3) then begin
a:=6;
f:=6;
x:=6;
o:=1;
m:=1;
end;
clrscr;writeln ('diem cua ban la:',diem);
write(a);
write(b);
write(c);
write(d);
writeln(e);
write(f);
write(g);
write(h);
write(j);
writeln(k);
write(x);
write(y);
write(z);
write(u);
writeln(i);
write(o);
write(p);
write(q);
write(r);
writeln(n);
write(m);
write(v);
write(w);
write(t);
writeln(l);
delay(550-diem*10);
if KeyPressed then
begin
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
ch:=ReadKey;
case ch of
#75 : if (ketthuc=0) then
begin
ttkey:=1;
end;
end;
end;
if (ttkey=1) then begin
if (tttime=5) then else tttime:=tttime+1;
end else
if (tttime=1) then else tttime:=tttime-1;
ttkey:=0;
if (tttime=1) then begin
b:=1;
g:=1;
y:=1;
p:=1;
v:=8;
end;
if (tttime=2) then begin
b:=1;
g:=1;
y:=1;
p:=8;
v:=1;
end;
if (tttime=3) then begin
b:=1;
g:=1;
y:=8;
p:=1;
v:=1;
end;
if (tttime=4) then begin
b:=1;
g:=8;
y:=1;
p:=1;
v:=1;
end;
if (tttime=5) then begin
b:=8;
g:=1;
y:=1;
p:=1;
v:=1;
end;
a:=1;
f:=1;
x:=1;
o:=1;
m:=1;
clrscr;
writeln ('diem cua ban la:',diem);
write(a);
write(b);
write(c);
write(d);
writeln(e);
write(f);
write(g);
write(h);
write(j);
writeln(k);
write(x);
write(y);
write(z);
write(u);
writeln(i);
write(o);
write(p);
write(q);
write(r);
writeln(n);
write(m);
write(v);
write(w);
write(t);
writeln(l);
end;
until ketthuc=1;
writeln('game over');
writeln('game duoc lap trinh boi phuc');
readln;
end.