program anim4;
uses crt;
procedure one;
var x:integer;
begin
for x:=0 to 5 do
begin
clrscr;
window (37+x,x,38+x,x);
write ('*');
delay (200);
end;
end;
procedure two;
var x:integer;
begin
for x:=1 to 5 do
begin
clrscr;
window (42-x,5+x,43-x,5+x);
write ('*');
delay (200);
end;
end;
procedure three;
var x:integer;
begin
for x:=1 to 5 do
begin
clrscr;
window (37+x,10+x,38+x,10+x);
write ('*');
delay (200);
end;
end;
procedure four;
var x:integer;
begin
for x:=1 to 5 do
begin
clrscr;
window (42-x,15+x,43-x,15+x);
write ('*');
delay (200);
end;
end;
procedure five;
var x:integer;
begin
for x:=1 to 5 do
begin
clrscr;
window (37+x,20+x,38+x,20+x);
write ('*');
delay (200);
end;
end;
procedure oneb;
var x:integer;
begin
for x:=0 to 5 do
begin
clrscr;
window (15+x,x,16+x,x);
write ('*');
delay (200);
end;
end;
procedure twob;
var x:integer;
begin
for x:=1 to 5 do
begin
clrscr;
window (20-x,5+x,21-x,5+x);
write ('*');
delay (200);
end;
end;
procedure threeb;
var x:integer;
begin
for x:=1 to 5 do
begin
clrscr;
window (15+x,10+x,16+x,10+x);
write ('*');
delay (200);
end;
end;
procedure fourb;
var x:integer;
begin
for x:=1 to 5 do
begin
clrscr;
window (20-x,15+x,21-x,15+x);
write ('*');
delay (200);
end;
end;
procedure fiveb;
var x:integer;
begin
for x:=1 to 5 do
begin
clrscr;
window (15+x,20+x,16+x,20+x);
write ('*');
delay (200);
end;
end;
procedure onec;
var x:integer;
begin
for x:=0 to 5 do
begin
clrscr;
window (67+x,x,68+x,x);
write ('*');
delay (200);
end;
end;
procedure twoc;
var x:integer;
begin
for x:=1 to 5 do
begin
clrscr;
window (72-x,5+x,73-x,5+x);
write ('*');
delay (200);
end;
end;
procedure threec;
var x:integer;
begin
for x:=1 to 5 do
begin
clrscr;
window (67+x,10+x,68+x,10+x);
write ('*');
delay (200);
end;
end;
procedure fourc;
var x:integer;
begin
for x:=1 to 5 do
begin
clrscr;
window (72-x,15+x,73-x,15+x);
write ('*');
delay (200);
end;
end;
procedure fivec;
var x:integer;
begin
for x:=1 to 5 do
begin
clrscr;
window (67+x,20+x,68+x,20+x);
write ('*');
delay (200);
end;
end;
begin
repeat
one; two; three; four; five; oneb;
twob; threeb; fourb; fiveb;
onec; twoc; threec; fourc; fivec;
until keypressed;
end.