randomize order last stats

This commit is contained in:
Lanta 2024-07-18 08:53:11 +02:00
parent 373513cc6a
commit 15f9905dcf

View file

@ -214,7 +214,12 @@ function Get-MatchStatsPlayer {
change = $change change = $change
} }
} }
return $MatchStatsPlayer | Sort-Object winratio -Descending $MatchStatsPlayer | ForEach-Object {
$_ | Add-Member -NotePropertyName RandomKey -NotePropertyValue (Get-Random) -PassThru
} | Sort-Object -Property RandomKey | Select-Object -Property * -ExcludeProperty RandomKey #randomize the order
return $MatchStatsPlayer
} }