Merge pull request #175 from OpzekerIT/dev

randomize order last stats
This commit is contained in:
Lanta 2024-07-18 08:53:58 +02:00 committed by GitHub
commit e284ed0b34
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -214,7 +214,12 @@ function Get-MatchStatsPlayer {
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
}