This achieves the same with less lines:
Simba Code:
function CheckLocation: String;
var
X, Y, i: integer;
Symbols: Array of String;
begin
Symbols := ['bank', 'altar', 'arrow'];
for i:=0 to 2 do
begin
if FindSymbol(X, Y, Symbols[i]) then
begin
Result := Symbols[i];
Break;
end;
end;
end;
Other then that, good you got it sorted out :P
Then you can have a case to define where you are in the mainloop
Simba Code:
//Mainloop;
begin
case CheckLocation of
'bank': begin
WriteLn('We are at the bank');
//Banking procedures
end;
'altar': begin
WriteLn('We are at the ruins');
//Ruins procedures
end;
'arrow': begin
WriteLn('We are at the altar');
//Altar procedures
end;
end;
end.