i think knowing wha these means will help a bunch!!
For i, #players .........
This means from 1 (i) to all the amount of #players, then the code will do something.
So if there are 10 different players. For i, #players means from 1 to all the 10 different players