diff options
author | Jed Barber <jjbarber@y7mail.com> | 2017-02-12 23:07:52 +1100 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2017-02-12 23:07:52 +1100 |
commit | 348dc88775fac78f5c1afa30c4f00d6d14dff592 (patch) | |
tree | b96db643d0642edf54242da5c672f3096bb98e22 /src/bundles.adb | |
parent | 60b2207a469a5a1e7a7e5619a8eb1b01c67f314a (diff) |
Election counting now works, logging improved from Haskell version, still need to fix exhausted paper collection
Diffstat (limited to 'src/bundles.adb')
-rw-r--r-- | src/bundles.adb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/bundles.adb b/src/bundles.adb index 9701c40..50741ee 100644 --- a/src/bundles.adb +++ b/src/bundles.adb @@ -86,6 +86,18 @@ package body Bundles is + procedure Count_Both + (This : in Bundle; + Votes : out Natural; + Papers : out Natural) is + begin + Papers := Count_Papers (This); + Votes := Rationals.Floor (Papers * This.Worth); + end Count_Both; + + + + function "<" (Left, Right : in Bundle) return Boolean is |