equal
deleted
inserted
replaced
55 end; |
55 end; |
56 |
56 |
57 procedure SetRandomSeed(Seed: shortstring); |
57 procedure SetRandomSeed(Seed: shortstring); |
58 var i: Longword; |
58 var i: Longword; |
59 begin |
59 begin |
|
60 n:= 54; |
|
61 |
60 if Length(Seed) > 54 then Seed:= copy(Seed, 1, 54); // not 55 to ensure we have odd numbers in cirbuf |
62 if Length(Seed) > 54 then Seed:= copy(Seed, 1, 54); // not 55 to ensure we have odd numbers in cirbuf |
61 |
63 |
62 for i:= 0 to pred(Length(Seed)) do |
64 for i:= 0 to pred(Length(Seed)) do |
63 cirbuf[i]:= byte(Seed[i + 1]) * (i + 1); |
65 cirbuf[i]:= byte(Seed[i + 1]) * (i + 1); |
64 |
66 |