Commit d741033edb2cf5c8183de00c07241e366ae7aebf
1 parent
a282100f
Exists in
master
runner: fix gen players as needed
Showing
1 changed file
with
18 additions
and
7 deletions
Show diff stats
experiment_runner/units/game_control.pas
... | ... | @@ -1062,7 +1062,15 @@ procedure TGameControl.ReceiveRequest(var ARequest: TStringList); |
1062 | 1062 | begin |
1063 | 1063 | // if not then generate and save p data |
1064 | 1064 | i := FExperiment.AppendPlayer; |
1065 | - P.Nicname := GenResourceName(i); | |
1065 | + if FExperiment.GenPlayersAsNeeded then | |
1066 | + P.Nicname := GenResourceName(i) | |
1067 | + else | |
1068 | + P.Nicname := InputBox | |
1069 | + ( | |
1070 | + 'Um participante entrou no experimento.', | |
1071 | + 'Qual o apelido do novo participante?', | |
1072 | + GenResourceName(i) | |
1073 | + ); | |
1066 | 1074 | P.Points.A:=0; |
1067 | 1075 | P.Points.B:=0; |
1068 | 1076 | P.Status:=gpsPlaying; |
... | ... | @@ -1245,12 +1253,15 @@ procedure TGameControl.ReceiveRequest(var ARequest: TStringList); |
1245 | 1253 | begin |
1246 | 1254 | P := FExperiment.PlayerFromID[ARequest[0]]; |
1247 | 1255 | ARequest[2] := K_RESUME+K_ARRIVED; |
1248 | - P.Nicname := InputBox | |
1249 | - ( | |
1250 | - 'Mudança de geração', | |
1251 | - 'Um novo participante entrou no lugar do participante mais antigo.Qual o apelido do novo participante?', | |
1252 | - GenResourceName(-1) | |
1253 | - ); | |
1256 | + if FExperiment.GenPlayersAsNeeded then | |
1257 | + P.Nicname := GenResourceName(-1) | |
1258 | + else | |
1259 | + P.Nicname := InputBox | |
1260 | + ( | |
1261 | + 'Mudança de geração', | |
1262 | + 'Um novo participante entrou no lugar do participante mais antigo.Qual o apelido do novo participante?', | |
1263 | + GenResourceName(-1) | |
1264 | + ); | |
1254 | 1265 | |
1255 | 1266 | S := FExperiment.PlayerAsString[P]; |
1256 | 1267 | ARequest.Append(S); // 3 | ... | ... |