{ File: labirdef.pas }

{ definizioni per la struttura dati LABIRINTO }

const
  N         = 10;
  M         = 15;
  NP1       = N + 1;
  MP1       = M + 1;
  PASSAGGIO = '-';   { punto del labirinto in cui si puo' camminare }

type
  IndiceRiga    = 0..NP1;
  IndiceColonna = 1..MP1;
  Labirinto     = array [IndiceRiga, IndiceColonna] of char;


  procedure LeggiLabirinto (var f: text; var lab: Labirinto);
  var
    i : IndiceRiga;
    j : IndiceColonna;

  begin { StampaLabirinto }
    reset(f);
    for i := 1 to N do
    begin
      for j := 1 to M do
        read(f, lab[i, j]);
      readln(f)
    end
  end; { LeggiLabirinto }


  procedure StampaLabirinto (var lab: Labirinto);
  var
    i : IndiceRiga;
    j : IndiceColonna;

  begin { StampaLabirinto }
    writeln;
    writeln('     LABIRINTO');
    for i := 1 to N do
    begin
      for j := 1 to M do
        write(lab[i, j]);
      writeln;
    end
  end; { StampaLabirinto }