Replaced currentPlayerIdx mocking code with live determination from database