summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2017-01-23 17:14:58 +1100
committerJed Barber <jjbarber@y7mail.com>2017-01-23 17:14:58 +1100
commitae2c1edbbfdeb2942ac4c35aeaae6996ae5e6e18 (patch)
tree55a636894383f51a5a09da29508eb91b4cf0dec4 /src
parenta65a1ba67d1e8a7f91101da8d1c8ae4497089a60 (diff)
Added seat field to logging
Diffstat (limited to 'src')
-rw-r--r--src/Election.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Election.hs b/src/Election.hs
index d7c8bee..e97eb69 100644
--- a/src/Election.hs
+++ b/src/Election.hs
@@ -30,6 +30,7 @@ data Election = Election
, getTotalPapers :: Int
, getQuota :: Int
, getNextLogNum :: Int
+ , getSeats :: Int
, getVacancies :: Int
, getTransferQueue :: [Transfer]
, getNextToElect :: Int
@@ -77,6 +78,7 @@ createElection outDir counter numToElect = do
, getTotalPapers = total
, getQuota = quota
, getNextLogNum = 1
+ , getSeats = numToElect
, getVacancies = numToElect
, getTransferQueue = []
, getNextToElect = 1
@@ -138,7 +140,8 @@ writeLog e = do
let logName = (getLogDir e) ++ "/" ++ (show (getNextLogNum e)) ++ ".csv"
header =
- [ "Vacancies"
+ [ "Seats"
+ , "Vacancies"
, "Total Papers"
, "Quota"
, "Candidate"
@@ -148,7 +151,8 @@ writeLog e = do
, "Changed"
, "Order Elected" ]
static =
- [ show (getVacancies e)
+ [ show (getSeats e)
+ , show (getVacancies e)
, show (getTotalPapers e)
, show (getQuota e)]
dynFunc c =