Changeset 591 for trunk/Database.pas
- Timestamp:
- Jul 24, 2024, 11:02:31 PM (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Database.pas
r590 r591 598 598 } 599 599 var 600 primitive: Integer;600 Primitive: Integer; 601 601 StartLoc, StartLoc2: array [0 .. nPl - 1] of Integer; { starting coordinates } 602 602 Elevation: array [0 .. lxmax * lymax - 1] of Byte; { map elevation } … … 607 607 I, J: Integer; 608 608 begin 609 primitive := 1;609 Primitive := 1; 610 610 I := 2; 611 611 while I * I <= MapSize + 1 do // test whether prime 612 612 begin 613 613 if (MapSize + 1) mod I = 0 then 614 primitive := 0;614 Primitive := 0; 615 615 Inc(I); 616 616 end; 617 617 618 if primitive > 0 then618 if Primitive > 0 then 619 619 repeat 620 Inc( primitive);620 Inc(Primitive); 621 621 I := 1; 622 622 J := 0; 623 623 repeat 624 624 Inc(J); 625 I := I * primitive mod (MapSize + 1);625 I := I * Primitive mod (MapSize + 1); 626 626 until (I = 1) or (J = MapSize + 1); 627 627 until J = MapSize; … … 630 630 function MapGeneratorAvailable: Boolean; 631 631 begin 632 Result := ( primitive > 0) and (lx >= 20) and (ly >= 40);632 Result := (Primitive > 0) and (lx >= 20) and (ly >= 40); 633 633 end; 634 634 … … 1155 1155 (Loc0 < MapSize - lx) then 1156 1156 RunRiver(Loc0); 1157 Loc0 := (Loc0 + 1) * primitive mod (MapSize + 1) - 1;1157 Loc0 := (Loc0 + 1) * Primitive mod (MapSize + 1) - 1; 1158 1158 end; 1159 1159 end; … … 1413 1413 end; 1414 1414 end; 1415 Loc := (Loc + 1) * primitive mod (MapSize + 1) - 1;1415 Loc := (Loc + 1) * Primitive mod (MapSize + 1) - 1; 1416 1416 end; 1417 1417
Note:
See TracChangeset
for help on using the changeset viewer.