lundi 9 janvier 2017

Random choose item from listbox

Here is my listbox messi ronaldo rooney xavi This listbox keep footballers and each of them has value. Now I want to choose randomly players and create 2 teams. Each team must be balanced. For example messi and xavi(8+5) must be same team. Ronaldo and ronaldo and rooney must be same team(9+4=13) how can i do this in javascript. Any algoritm?




Aucun commentaire:

Enregistrer un commentaire