Changeset 211 for trunk/UGame.pas
- Timestamp:
- May 23, 2018, 8:53:58 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UGame.pas
r210 r211 3176 3176 // Select new player from alive players 3177 3177 AlivePlayers := TPlayers.Create(False); 3178 Players.GetAlivePlayers(AlivePlayers); 3179 NewPlayerIndex := AlivePlayers.IndexOf(CurrentPlayer) + 1; 3180 if NewPlayerIndex >= AlivePlayers.Count then begin 3181 // Start of turn 3182 Inc(TurnCounter); 3183 RecordTurnStats; 3184 if Assigned(FOnNewTurn) then 3185 FOnNewTurn(Self); 3186 NewPlayerIndex := NewPlayerIndex mod AlivePlayers.Count; 3187 end; 3188 CurrentPlayer := AlivePlayers[NewPlayerIndex]; 3178 try 3179 Players.GetAlivePlayers(AlivePlayers); 3180 NewPlayerIndex := AlivePlayers.IndexOf(CurrentPlayer) + 1; 3181 if NewPlayerIndex >= AlivePlayers.Count then begin 3182 // Start of turn 3183 Inc(TurnCounter); 3184 RecordTurnStats; 3185 if Assigned(FOnNewTurn) then 3186 FOnNewTurn(Self); 3187 NewPlayerIndex := NewPlayerIndex mod AlivePlayers.Count; 3188 end; 3189 CurrentPlayer := AlivePlayers[NewPlayerIndex]; 3190 finally 3191 AlivePlayers.Free; 3192 end; 3189 3193 3190 3194 if Assigned(FOnPlayerChange) then
Note:
See TracChangeset
for help on using the changeset viewer.