Hi, Wesbat (not the name you were given at birth, I'll warrant
),
I'm happy to report that on macOS 14.6.1 the game loads, runs, and looks very nice indeed. One small spot of bother; when I start the game (I haven't managed to finish a game yet 😉), the program gives a TInOutError when it tries to create a new copy of scores.dat. This is the code in question is...
procedure TScoresForm.CreateNewScoresFile();
Var
ScoresFile: File of TScore;
Entry: TScore;
i: Byte;
begin
If FileExists(SCORE_FILE_PATH) then Exit();
AssignFile(ScoresFile, SCORE_FILE_PATH);
Rewrite(ScoresFile, SizeOf(TScore)); // <=== CODE CRASHES HERE
Entry.Name := 'Computer';
for i := 0 to High(TopScores) do
begin
Entry.Moves := 100 + i * 10;
Entry.Clock := (i*30+5*60);
Entry.Date := Now;
Entry.Score := CalculateScore(Entry.Moves, Entry.Clock);
Write(ScoresFile, Entry);
end;
CloseFile(ScoresFile);
end;
In the interests of testing (and because it's a strangly addictive game
) I persevered and finished the game, whereupon the program crashed again when it tried to write a score file. This time here...
procedure TScoresForm.WriteScores();
Var
ScoresFile: File of TScore;
i: Byte;
begin
AssignFile(ScoresFile, SCORE_FILE_PATH);
Rewrite(ScoresFile, SizeOf(TScore)); // <=== CODE CRASHES HERE
for i := 0 to High(TopScores) do
begin
Write(ScoresFile, TopScores[i]);
end;
CloseFile(ScoresFile);
end;
Those glitches apart, it's a really great example of how one can get back in the Pascal groove after a long absence! Kudos to you