fixed typo and the playerIndex changes on every 3rd iteration as it should be