Skip to content

Commit dbc9608

Browse files
authored
fix(SurvivalCrisis): correct index calculation in Shuffle method
1 parent da31cb6 commit dbc9608

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/SurvivalCrisis/Utils.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public static void Shuffle<T>(this Random rand, IList<T> list)
3333
{
3434
for (int i = 0; i < list.Count - 1; i++)
3535
{
36-
int idx = rand.Next(list.Count - i - 1);
36+
int idx = rand.Next(list.Count - i);
3737
var temp = list[idx];
3838
list[idx] = list[list.Count - i - 1];
3939
list[list.Count - i - 1] = temp;

0 commit comments

Comments
 (0)