dadoming / SortPeopleIntoTeams

2 stars 0 forks source link

Segregate the code in order to allow for bigger and better development #3

Open dadoming opened 8 months ago

dadoming commented 8 months ago

What I mean by this is:


Create maybe a prompt that just needs to input like:

  1. Normal Sort
  2. 42 sort
  3. Other sorts...

    After that prompt for the relative path of the names_file.txt.


    Prompt for the minimum number of participants per team Prompt for the maximum number of participants per team


The prompt part will basically grab and parse the values based on the sorting algorithm selected.

All of this would be separated into different files in the root of the directory, For now I think this would be fine.

_ Prompts _ Sorts ___ 42_Sort.py ___ normal_sort.py ___ other_sorts.py
_ main.py
_ READ.me
_ requirements.txt
dadoming commented 8 months ago

Where would the flags be inserted here?

MariaAguiar commented 8 months ago

Without any flags, the only sorting you have is the random function on the names.

Flags (either FLAG, RANGE or VALUES) turn their respective columns into additional sorting criteria:

Each column with a flag constitutes an additional, independent criteria to take into account, meaning you can add as many flags as you want in as many columns as you want in a single sorting to further restrict it (within realistic bounds)

In short, it is a more flexible, but controlled type of sorting... it was meant to be customisable, while keeping it good and feasible within reason...

Customized sort?

MariaAguiar commented 8 months ago

Additionally to this customized sort, you could do a weighted version, where you modify the order in which you loose each criteria until you get a viable solution (based on user input)