From: Ian Jackson Date: Tue, 23 Aug 2016 12:46:39 +0000 (+0100) Subject: compute-scottish-stv: make --for-compare list winners too X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=appendix-a6.git;a=commitdiff_plain;h=57ed77b598efe9c02d160c2ca3cc55512eeb7f29;ds=sidebyside compute-scottish-stv: make --for-compare list winners too --- diff --git a/compute-scottish-stv b/compute-scottish-stv index 40a6667..43d3a72 100755 --- a/compute-scottish-stv +++ b/compute-scottish-stv @@ -220,6 +220,12 @@ sub countballots () { push @pr, $c; } + if ($for_compare) { + # for comparison with OpenSTV, which always prints + # the quota for every elected candidate + push @pr, { %$_, Total => $quota } foreach @elected; + } + foreach my $c (reverse sort $display_cmp @pr) { prf "candidate %-10s: %s votes\n", $c->{Cand}, sv $c->{Total}; }