From 1f133b7f5cad90158980c236ff173b755bcf4717 Mon Sep 17 00:00:00 2001 From: agreatnate Date: Tue, 22 Oct 2019 14:08:19 -0400 Subject: [PATCH 1/3] Correct the way that local PascalScript was being included in the Lazarus Project --- TurboRisk.lpi | 16 +++++++++------- players/simple.trp | 13 +++---------- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/TurboRisk.lpi b/TurboRisk.lpi index 8766746..832d2de 100644 --- a/TurboRisk.lpi +++ b/TurboRisk.lpi @@ -136,18 +136,15 @@ - + - + - - - - + - + @@ -292,12 +289,17 @@ + + + + + diff --git a/players/simple.trp b/players/simple.trp index ebc45f1..26b8dac 100644 --- a/players/simple.trp +++ b/players/simple.trp @@ -28,24 +28,17 @@ end; procedure Placement(var ToTerritory: integer); var T, A,B: integer; - Ratio,MaxRatio,NewRatio: double; + Ratio,MaxRatio: double; begin {$DEFINE PS_DELPHIDIV} -// ULogOn; + 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; From e8fecaf33ae0f14fabee2a80fc2a5a71e682a3fc Mon Sep 17 00:00:00 2001 From: agreatnate Date: Tue, 22 Oct 2019 14:27:31 -0400 Subject: [PATCH 2/3] Remove debug code from simple.trp --- players/simple.trp | 2 -- 1 file changed, 2 deletions(-) diff --git a/players/simple.trp b/players/simple.trp index 26b8dac..f3ca52a 100644 --- a/players/simple.trp +++ b/players/simple.trp @@ -30,8 +30,6 @@ var T, A,B: integer; Ratio,MaxRatio: double; begin - {$DEFINE PS_DELPHIDIV} - ULogOn; // reinforce territory with greatest ratio between total enemy armies and // own armies ToTerritory:=0; From 9512e0936fea84c1d8209249ee3842a5583a6b65 Mon Sep 17 00:00:00 2001 From: agreatnate Date: Tue, 22 Oct 2019 16:11:29 -0400 Subject: [PATCH 3/3] Fix PascalScript in TRSim Project File --- TRSim.lpi | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/TRSim.lpi b/TRSim.lpi index 5a6c72b..1c6aa26 100644 --- a/TRSim.lpi +++ b/TRSim.lpi @@ -24,6 +24,7 @@ + @@ -56,18 +57,15 @@ - + - + - - - - + - + @@ -75,7 +73,9 @@ + + @@ -213,12 +213,17 @@ + + + + +