Skip to content

Commit

Permalink
Merge pull request #23 from agreatnate/master
Browse files Browse the repository at this point in the history
The local, modified PascalScript didn't seem to be pulled in correctly
  • Loading branch information
brian-scott-andrews authored Oct 24, 2019
2 parents 56324d6 + 9512e09 commit 8bf67f3
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 25 deletions.
19 changes: 12 additions & 7 deletions TRSim.lpi
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<Version Value="11"/>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<OtherUnitFiles Value="PascalScript/Source"/>
</SearchPaths>
<Parsing>
<SyntaxOptions>
Expand Down Expand Up @@ -56,26 +57,25 @@
<Mode0 Name="default"/>
</Modes>
</RunParams>
<RequiredPackages Count="3">
<RequiredPackages Count="2">
<Item1>
<PackageName Value="pascalscript"/>
<PackageName Value="lhelpcontrolpkg"/>
</Item1>
<Item2>
<PackageName Value="lhelpcontrolpkg"/>
</Item2>
<Item3>
<PackageName Value="LCL"/>
</Item3>
</Item2>
</RequiredPackages>
<Units Count="30">
<Units Count="31">
<Unit0>
<Filename Value="TRSim.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="Sim.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="fSim"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
</Unit1>
<Unit2>
<Filename Value="Globals.pas"/>
Expand Down Expand Up @@ -213,12 +213,17 @@
<IsPartOfProject Value="True"/>
<HasResources Value="True"/>
</Unit29>
<Unit30>
<Filename Value="PascalScript/Source/pascalscript.pas"/>
<IsPartOfProject Value="True"/>
</Unit30>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<OtherUnitFiles Value="PascalScript/Source"/>
</SearchPaths>
<Parsing>
<SyntaxOptions>
Expand Down
16 changes: 9 additions & 7 deletions TurboRisk.lpi
Original file line number Diff line number Diff line change
Expand Up @@ -136,18 +136,15 @@
<Mode0 Name="default"/>
</Modes>
</RunParams>
<RequiredPackages Count="3">
<RequiredPackages Count="2">
<Item1>
<PackageName Value="pascalscript"/>
<PackageName Value="lhelpcontrolpkg"/>
</Item1>
<Item2>
<PackageName Value="lhelpcontrolpkg"/>
</Item2>
<Item3>
<PackageName Value="LCL"/>
</Item3>
</Item2>
</RequiredPackages>
<Units Count="28">
<Units Count="29">
<Unit0>
<Filename Value="TurboRisk.lpr"/>
<IsPartOfProject Value="True"/>
Expand Down Expand Up @@ -292,12 +289,17 @@
<IsPartOfProject Value="True"/>
<HasResources Value="True"/>
</Unit27>
<Unit28>
<Filename Value="PascalScript/Source/pascalscript.pas"/>
<IsPartOfProject Value="True"/>
</Unit28>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<OtherUnitFiles Value="PascalScript/Source"/>
</SearchPaths>
<Parsing>
<SyntaxOptions>
Expand Down
13 changes: 2 additions & 11 deletions players/simple.trp
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,15 @@ end;
procedure Placement(var ToTerritory: integer);
var
T, A,B: integer;
Ratio,MaxRatio,NewRatio: double;
Ratio,MaxRatio: double;
begin
{$DEFINE PS_DELPHIDIV}
// ULogOn;
// reinforce territory with greatest ratio between total enemy armies and
// own armies
ToTerritory:=0;
MaxRatio:=0;
for T:=1 to 42 do begin
if TIsFront(T) then begin // territory is mine and front
Ratio := 1.0*TPressure(T) / TArmies(T);
A:=1;
B:=2;
NewRatio := A / B;
ULog('Here');
if NewRatio>0 then begin
ULog('It is!');
end;
Ratio := TPressure(T) / TArmies(T);
if Ratio>MaxRatio then begin
ToTerritory:=T;
MaxRatio:=Ratio;
Expand Down

0 comments on commit 8bf67f3

Please sign in to comment.