AceyDucey/pascal: Move Randomize()

Randomize() should be called only once and as soon as possible.
This commit is contained in:
baka0815
2022-01-03 18:24:09 +01:00
parent 5ee452189a
commit 6977afdef0
2 changed files with 2 additions and 2 deletions

View File

@@ -85,6 +85,7 @@ end;
constructor TGame.Create; constructor TGame.Create;
begin begin
Randomize;
FDeck:= TDeck.Create; FDeck:= TDeck.Create;
end; end;
@@ -99,7 +100,6 @@ begin
ClrScr; ClrScr;
PrintGreeting; PrintGreeting;
repeat repeat
Randomize;
FStash:= 100; FStash:= 100;
repeat repeat
PrintBalance; PrintBalance;

View File

@@ -118,10 +118,10 @@ begin
end; end;
begin begin
Randomize;
ClrScr; ClrScr;
PrintGreeting; PrintGreeting;
repeat repeat
Randomize;
Stash:= 100; Stash:= 100;
repeat repeat
PrintBalance; PrintBalance;