{ (c) 1998 CREEQ <creeq@web.de> }
program Gesicht;
uses Crt,Graph,Mouse;
var
  Gd, Gm : Integer;
  x , y  : integer;
  a      : byte;
label 1,2;
procedure links;
begin
  setcolor(white);
  putpixel(230,150,15);
  circle(230,150,1);
  circle(230,150,2);
  circle(230,150,3);
  circle(230,150,4);
  circle(230,150,5);
  putpixel(370,150,15);
  circle(370,150,1);
  circle(370,150,2);
  circle(370,150,3);
  circle(370,150,4);
  circle(370,150,5);
end;

procedure rechts;
begin
  setcolor(white);
  putpixel(270,150,15);
  circle(270,150,1);
  circle(270,150,2);
  circle(270,150,3);
  circle(270,150,4);
  circle(270,150,5);
  putpixel(410,150,15);
  circle(410,150,1);
  circle(410,150,2);
  circle(410,150,3);
  circle(410,150,4);
  circle(410,150,5);
end;

procedure runter;
begin
  setcolor(white);
  putpixel(260,170,15);
  circle(260,170,1);
  circle(260,170,2);
  circle(260,170,3);
  circle(260,170,4);
  circle(260,170,5);
  putpixel(380,170,15);
  circle(380,170,1);
  circle(380,170,2);
  circle(380,170,3);
  circle(380,170,4);
  circle(380,170,5);
end;

procedure links_oben;
begin
  setcolor(white);
  putpixel(240,130,15);
  circle(240,130,1);
  circle(240,130,2);
  circle(240,130,3);
  circle(240,130,4);
  circle(240,130,5);
  putpixel(380,130,15);
  circle(380,130,1);
  circle(380,130,2);
  circle(380,130,3);
  circle(380,130,4);
  circle(380,130,5);
end;

procedure rechts_oben;
begin
  setcolor(white);
  putpixel(260,130,15);
  circle(260,130,1);
  circle(260,130,2);
  circle(260,130,3);
  circle(260,130,4);
  circle(260,130,5);
  putpixel(400,130,15);
  circle(400,130,1);
  circle(400,130,2);
  circle(400,130,3);
  circle(400,130,4);
  circle(400,130,5);
end;

procedure links_unten;
begin
  setcolor(white);
  putpixel(240,170,15);
  circle(240,170,1);
  circle(240,170,2);
  circle(240,170,3);
  circle(240,170,4);
  circle(240,170,5);
  putpixel(380,170,15);
  circle(380,170,1);
  circle(380,170,2);
  circle(380,170,3);
  circle(380,170,4);
  circle(380,170,5);
end;

procedure rechts_unten;
begin
  setcolor(white);
  putpixel(260,170,15);
  circle(260,170,1);
  circle(260,170,2);
  circle(260,170,3);
  circle(260,170,4);
  circle(260,170,5);
  putpixel(400,170,15);
  circle(400,170,1);
  circle(400,170,2);
  circle(400,170,3);
  circle(400,170,4);
  circle(400,170,5);
end;

procedure hoch;
begin
  setcolor(white);
  putpixel(260,130,15);
  circle(260,130,1);
  circle(260,130,2);
  circle(260,130,3);
  circle(260,130,4);
  circle(260,130,5);
  putpixel(380,130,15);
  circle(380,130,1);
  circle(380,130,2);
  circle(380,130,3);
  circle(380,130,4);
  circle(380,130,5);
end;

procedure mitte;
begin
  setcolor(white);
  putpixel(250,150,15);
  circle(250,150,1);
  circle(250,150,2);
  circle(250,150,3);
  circle(250,150,4);
  circle(250,150,5);
  putpixel(390,150,15);
  circle(390,150,1);
  circle(390,150,2);
  circle(390,150,3);
  circle(390,150,4);
  circle(390,150,5);
end;

procedure aufbau;
begin
  cleardevice;
  setcolor(white);
  circle(320,240,200);
  circle(320,240,25);
  circle(250,150,30);
  circle(390,150,30);
  line(220,300,420,300);
  arc(320,300,180,360,100);
end;

begin
  Gd := Detect;
  InitGraph(Gd, Gm, '');
  if GraphResult <> grOk then
    Halt(1);
  aufbau;
  mitte;
  mouse.on;
2:repeat
    x := getx;
    y := gety;
    if keypressed then goto 1;
    if x > 320 then begin
                      if y > 100 then if y < 300 then if x > 500 then begin
                                                        if a = 1 then goto 2;
                                                        aufbau;
                                                        rechts;
                                                        a := 1;
                                                        end;
                      if y < 100 then if x > 500 then begin
                                                             if a = 2 then goto 2;
                                                             aufbau;
                                                             rechts_oben;
                                                             a := 2;
                                                           end;
                      if y < 100 then if x < 500 then begin
                                                             if a = 3 then goto 2;
                                                             aufbau;
                                                             hoch;
                                                             a := 3;
                                                           end;
                      if y > 380 then if x > 500 then begin
                                                             if a = 4 then goto 2;
                                                             aufbau;
                                                             rechts_unten;
                                                             a := 4;
                                                           end;
                      if y > 380 then if x < 500 then begin
                                                             if a = 5 then goto 2;
                                                             aufbau;
                                                             runter;
                                                             a := 5;
                                                           end;
    end;
    if x < 320 then begin
                      if y > 100 then if y < 300 then if x < 140 then begin
                                                        if a = 6 then goto 2;
                                                        aufbau;
                                                        links;
                                                        a := 6;
                                                        end;
                      if y < 100 then if x < 140 then begin
                                                             if a = 7 then goto 2;
                                                             aufbau;
                                                             links_oben;
                                                             a := 7;
                                                           end;
                      if y < 100 then if x > 140 then begin
                                                             if a = 3 then goto 2;
                                                             aufbau;
                                                             hoch;
                                                             a := 3;
                                                           end;
                      if y > 380 then if x < 140 then begin
                                                             if a = 9 then goto 2;
                                                             aufbau;
                                                             links_unten;
                                                             a := 9;
                                                           end;
                      if y > 380 then if x > 140 then begin
                                                             if a = 5 then goto 2;
                                                             aufbau;
                                                             runter;
                                                             a := 5;
                                                           end;
  end;
  if x > 140 then if x < 500 then if y > 100 then if y < 380 then begin
                                                                    if a = 100 then goto 2;
                                                                    aufbau;
                                                                    mitte;
                                                                    a := 100;
                                                                  end;
  until false;
1:readkey;
  mouse.off;
  closegraph;
end.
