home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
MBUG
/
MBUG133.ARC
/
VILLAGE2.ARC
/
VILLFIND.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1988-08-07
|
2KB
|
50 lines
program VillagerFinder;
{ Locates position of every characters and displays their stats. }
type
strng= string[80]; { Strind Data }
others= record { Computer-Player Data }
name: strng;
x, y, gold, food: integer;
villager, friend: boolean;
end;
people= record { Player Data }
name: strng;
x, y, gold, food, foodback, scouts, bonus: integer;
dead, expert, played: boolean;
end;
var
otherfile: file of others; { Computer-Player file }
other: others; { Computer-Player }
personfile: file of people; { Player file }
person: people; { Player }
begin
writeln('Villager Utility to find all characters. By Andrew Scott.');
writeln;
writeln('Name':40,' X Y Gold Food Scouts');
writeln('------------------------------------------------------------------');
assign(personfile,'VILL1.DAT');
assign(otherfile,'VILL2.DAT');
{$I-} reset(otherfile); {$I+}
if ioresult<>0 then writeln('Character file doesn''t exist.') else begin
while not eof(otherfile) do begin
read(otherfile,other);
writeln(other.name:40,other.x:4,other.y:4,' ',other.gold:4,
' ',other.food:4,' -');
end;
close(otherfile);
end;
{$I-} reset(personfile); {$I+}
if ioresult<>0 then writeln('Person file doesn''t exist.') else begin
while not eof(personfile) do begin
read(personfile,person);
writeln(person.name:40,person.x:4,person.y:4,' ',person.gold:4,
' ',person.food:4,' ',person.scouts:4);
end;
close(personfile);
end;
writeln('------------------------------------------------------------------');
end.