Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program Lumberjack;
- {.include srl/srl.scar}
- procedure DeclarePlayers;
- begin
- HowManyPlayers := 1;
- NumberOfPlayers(HowManyPlayers);
- CurrentPlayer := 0;
- with Players[0] do
- begin
- Name := '';
- Pass := '';
- Active := True;
- Strings[0] := 'draynor';
- // Tree, Oak, Willow, Yew
- Integers := [0, 20, 40, 70];
- Loc := '';
- end;
- end;
- type
- floop = array of function: Boolean;
- procedure AppendLoop(var loopy: floop; toAdd: function: Boolean);
- var
- l: Integer;
- begin
- l := Length(loopy);
- SetLength(loopy, l + 1);
- loopy[l] := ___Pointer(toAdd);
- end;
- function CheckLocation: Integer;
- begin
- end;
- function WalkToTree: Boolean;
- begin
- end;
- function ChopLoop: Boolean;
- begin
- end;
- function HandleLogs: Boolean;
- begin
- end;
- function WalkToBank: Boolean;
- begin
- end;
- var
- mloop: floop;
- s, h, i, t: Integer;
- np: Boolean;
- begin
- Writeln('Begin');
- SetupSRL;
- DeclarePlayers;
- AppendLoop(mloop, @WalkToTree);
- AppendLoop(mloop, @ChopLoop);
- AppendLoop(mloop, @HandleLogs);
- AppendLoop(mloop, @WalkToBank);
- h := High(mloop);
- repeat
- np := True;
- s := CheckLocation;
- for i := s to h do
- begin
- if (not mloop[i]()) then
- begin
- np := False;
- break;
- end;
- end;
- NextPlayer(np);
- until False;
- Writeln('End');
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement