christianfalck / EvenTheTeams

A C# project for dividing players into two even teams
0 stars 0 forks source link

Algorithm v4 #3

Open christianfalck opened 5 years ago

christianfalck commented 5 years ago

When dividing the two teams, the algorithm should minimize the distance (or cost): Two players who have played together more often than against eachother before: -X points Similar players in one team (only attackers, all fast players, etc.): -Y points The total player score is higher in one of the teams: -Z x difference pints.

Setting values for X, Y and Z is equal to prioritize what's most important. Probably Z > X > Y ... atleast until Y is correctly set for all players (how to verify this though?)

christianfalck commented 5 years ago

Need to keep track of which players that participated in the different games. GameManager.cs keeps a List of Game. Each Game has Player[] participants, int winnerScore, int loserScore. That way, player scores as well as calculating how many that plays with the same people can be done in the algorithm rather than in FileHandler.