mardi 2 février 2021

C# Voting simulator - How to count the most unvoted items? [closed]

I'm working with an Eurovision Voting Contest Simulator.

26 countries have to randomly vote other 10 countries (without duplicates nor itself).

So I do a for (Countries.Length) and inside a for (PossibleVotes.Length) For assigning the votes.

Even handling a counter for highest voted (12points) to show 'TheBest' winners.

This is already done. (I'll post the code later to clarify)

Teacher asks to show also, the 'TheLooser' winner, which is the country (or the countries, in a tie) who have been less voted or voted '0'.

My idea is to assign '0' vote to the 16 other countries after I have assigned the real PossibleVotes to the 10 random countries.

I'm posting the code ASAP But I'm interested in the abstract thinking of this.

Thank you




Aucun commentaire:

Enregistrer un commentaire