diff --git a/experiment_runner/units/game_actors.pas b/experiment_runner/units/game_actors.pas index ae8a8da..975ee56 100644 --- a/experiment_runner/units/game_actors.pas +++ b/experiment_runner/units/game_actors.pas @@ -732,8 +732,10 @@ procedure TConsequence.PresentPoints(APlayerBox: TPlayerBox; G: TLabel); begin if gscG in FStyle then G.Caption:= IntToStr(StrToInt(G.Caption) + FP.ResultAsInteger) - else - APlayerBox.LabelPointsCount.Caption := IntToStr(StrToInt(APlayerBox.LabelPointsCount.Caption) + FP.ResultAsInteger); + + if (gscI in FStyle) or (gscA in FStyle) or (gscB in FStyle) then + if Assigned(APlayerBox) then + APlayerBox.LabelPointsCount.Caption := IntToStr(StrToInt(APlayerBox.LabelPointsCount.Caption) + FP.ResultAsInteger); end; function TConsequence.GetShouldPublishMessage: Boolean; // for players only diff --git a/experiment_runner/units/game_control.pas b/experiment_runner/units/game_control.pas index cd580ca..5e86920 100644 --- a/experiment_runner/units/game_control.pas +++ b/experiment_runner/units/game_control.pas @@ -306,6 +306,7 @@ end; function TGameControl.GetPlayerBox(AID: UTF8string): TPlayerBox; var i : integer; begin + Result := nil; for i := 0 to FormMatrixGame.GBLastChoice.ComponentCount-1 do if TPlayerBox(FormMatrixGame.GBLastChoice.Components[i]).ID = AID then begin @@ -536,6 +537,8 @@ begin {$IFDEF DEBUG} WriteLn(S); {$ENDIF} + // player box is ignored for group points + // LabelGroupCount is ignored for player points LConsequence.PresentPoints(GetPlayerBox(AID), FormMatrixGame.LabelGroupCount); end; end; @@ -644,7 +647,6 @@ begin gaPlayer:FExperiment := TExperiment.Create(FZMQActor.Owner); gaWatcher:FExperiment := TExperiment.Create(FZMQActor.Owner); end; - FExperiment.State:=xsWaiting; FExperiment.OnEndTurn := @NextTurn; FExperiment.OnEndCycle := @NextCycle; FExperiment.OnEndCondition:= @NextCondition; -- libgit2 0.21.2