summaryrefslogtreecommitdiff
path: root/wk3/pset
diff options
context:
space:
mode:
authorFudgerboy <91767657+Fudgerboy@users.noreply.github.com>2024-02-19 22:09:56 +0000
committerFudgerboy <91767657+Fudgerboy@users.noreply.github.com>2024-02-19 22:09:56 +0000
commit3be40cd1ea9ba53f342b6462a14db8ad78143546 (patch)
tree552b1d2ea816290b3879b3123c01c2631c99db9a /wk3/pset
parent1babf8a7891a57e72803e7e7c61fe5c2e1d7b226 (diff)
Mon, Feb 19, 2024, 2:09 PM -08:00
Diffstat (limited to 'wk3/pset')
-rw-r--r--wk3/pset/runoff/runoff.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/wk3/pset/runoff/runoff.c b/wk3/pset/runoff/runoff.c
index 0e05e15..5434132 100644
--- a/wk3/pset/runoff/runoff.c
+++ b/wk3/pset/runoff/runoff.c
@@ -143,12 +143,13 @@ void tabulate(void)
{
for (int i = 0; i < voter_count; i++)
{
- // Query for each rank
+ //
for (int j = 0; j < candidate_count; j++)
{
if (!candidates[preferences[i][j]].eliminated)
{
candidates[preferences[i][j]].votes++;
+ break;
}
}
}