Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Danib Election #25

Merged
merged 89 commits into from
Apr 29, 2020
Merged

Danib Election #25

merged 89 commits into from
Apr 29, 2020

Conversation

gur111
Copy link
Owner

@gur111 gur111 commented Apr 21, 2020

No description provided.

@gur111
Copy link
Owner Author

gur111 commented Apr 21, 2020

Add this function to AugMap:

Map augMapConvertToMap(AugMap augMap) {
    if (augMap == NULL) {
        return NULL;
    }

    Map map = augMap->map;
    free(augMap);
    return map;
}

With signature to header file:

Map augMapConvertToMap(AugMap map);

election/election.c Outdated Show resolved Hide resolved
election/election.c Show resolved Hide resolved
election/election.c Show resolved Hide resolved
election/election.c Outdated Show resolved Hide resolved
election/election.c Show resolved Hide resolved
election/election.c Outdated Show resolved Hide resolved
election/election.c Outdated Show resolved Hide resolved
election/election.c Outdated Show resolved Hide resolved
election/election.c Outdated Show resolved Hide resolved
wining_votes = t_votes;
}
}
status = augMapPutInt(map, area, wining_tribe_id);
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to add (for each area):

if(max_votes == 0){
    winning_tribe_id = augMapGetMinKey(election->tribes);
}

@danibondar danibondar linked an issue Apr 29, 2020 that may be closed by this pull request
@danibondar danibondar linked an issue Apr 29, 2020 that may be closed by this pull request
election/election.c Show resolved Hide resolved
election/election.c Show resolved Hide resolved
election/election.c Outdated Show resolved Hide resolved
election/election.c Show resolved Hide resolved
election/election.c Show resolved Hide resolved
election/election.c Outdated Show resolved Hide resolved
election/election.c Outdated Show resolved Hide resolved
election/election.c Outdated Show resolved Hide resolved
election/augmented_map.c Show resolved Hide resolved
election/election.c Outdated Show resolved Hide resolved
@danibondar danibondar merged commit 000f4f5 into master Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants