+# If there are any positions that are not accounted for by any moves,
+# these have to be games that end here. Add them as pseudo-moves so as
+# not to confuse the user.
+for my $result (['1-0', 'white', $white_left], ['1/2-1/2', 'draw', $draw_left], ['0-1', 'black', $black_left]) {
+ next if ($result->[2] == 0);
+ my $move = {
+ move => $result->[0],
+ white => 0,
+ draw => 0,
+ black => 0
+ };
+ $move->{$result->[1]} = $result->[2];
+ push @json_moves, $move;
+}
+