i信息学奥赛

加入QQ群:1025629106,或关注微信公众号:i信息学奥赛,获取更多学习资源。

导航

搭车

Posted on 2016-12-12 13:48  shnoip  阅读(185)  评论(0编辑  收藏  举报
感谢洋泾南校荆宇同同学提供
uses crt;
var
  xc,xr,y:byte;
procedure mc;
begin
  clrscr;
  gotoxy(xc+4,y-1);
  writeln('╭---╮');
  gotoxy(xc+1,y);
  writeln('╭╯   |');
  gotoxy(xc+12,y);
  textcolor(yellow);write('~');
  gotoxy(xc+13,y);
  textcolor(lightgreen);write('~');
  gotoxy(xc+14,y);
  textcolor(red);write('~');
  textcolor(white);
  gotoxy(xc,y+1);
  writeln('╰⊙══⊙╯');
  gotoxy(xc+12,y+1);
  textcolor(yellow);write('~');
  gotoxy(xc+13,y+1);
  textcolor(lightgreen);write('~');
  gotoxy(xc+14,y+1);
  textcolor(red);write('~');
  textcolor(white);
end;
 
procedure mm;
begin
  gotoxy(xr,y-1);
  write('*');
  if xr mod 2=0 then begin gotoxy(xr-1,y);write('/|\');end
                else begin gotoxy(xr,y);write('|');end;
  gotoxy(xr,y+1);
  write('^');
end;
 
begin
  cursoroff;
  xc:=68;y:=20;xr:=80;
  repeat
    mc;
    delay(100);
    xc:=xc-1;
  until xc=40;
  repeat
    mc;mm;
    delay(100);
    xc:=xc-1;
    xr:=xr-1;
  until xc=37;
  repeat
    mc;mm;
    gotoxy(74,18);
    write('等等我!');
    delay(100);
    xc:=xc-1;
  until xc=34;
  delay(1000);
  xc:=xc+1;
  repeat
    mc;mm;
    delay(100);
    xr:=xr-1;
  until xr=47;
  delay(500);
  repeat
    mc;
    delay(100);
    xc:=xc-2;
  until xr=3;
  mc;
  readln;;
end.