gotoxy(x,y); writeln(' ');
procedure writexy(x : integer; y : integer; keimeno : string); begin gotoxy(x,y); writeln(keimeno); end;
gotoxy(x,y); writeln(pacman);
με
writexy(x,y,pacman);
gotoxy(x,y); writeln(' ');
με
writexy(x,y,' ');
procedure pacmanMetakinisi; begin // Εδώ θα μπεί όλος ο κώδικας που υπάρχει ανάμεσα στο repeat .. until end;
repeat pacmanMetakinisi; until pliktro=pliktroexodou;
fantasma = '#';
xf:=3; yf:=10; writexy(xf,yf,fantasma);
procedure fantasmaMetakinisi; begin end;
writexy(xf,yf,' ');
if xf<x then xf:=xf+1
if xf<x then xf:=xf+1 else if xf>x then xf:=xf-1
if keypressed then pacmanMetakinisi else begin delay(200); fantasmaMetakinisi; end;
until (pliktro=pliktroexodou) or ( (xf=x) and (yf=y) );