+# Find the rank of all the players in every group, via simple insertion-like
+# sort
+for my $r (@rounds) {
+ for my $p (@{$r->{'parallels'}}) {
+ my $pls = $p->{'players'};
+ for my $i (0..$#$pls) {
+ my $rank = 1;
+ for my $j (0..($i-1)) {
+ if ($pls->[$i]->{'total'} < $pls->[$j]->{'total'}) {
+ $pls->[$i]->{'rank'}++;
+ } elsif ($pls->[$i]->{'total'} > $pls->[$j]->{'total'}) {
+ $pls->[$j]->{'rank'}++;
+ }
+ }
+ }
+ }
+}
+