getActivePlayerIndex() function returns 0 if the player is not active and also if the player is active at index 0 which creates confusion that the player is active at index 0 or inactive player.
We can fix this by returning -1 when the player is not active.
Here, the function getActivePlayerIndex() returns 0 when the player is not active which creates confusion that the player is active at index 0 or inactive player.
getActivePlayerIndex() returns 0 whether the player is not active or the player is active at index 0 .
Manual Review
To avoid confusion, it is recommended to return -1 instead of 0 when the player is not active.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.