refund() does not follow CEI pattern therefore it is vulnerable to reentrancy attack.
players[playerIndex] = address(0); is updated after payable(msg.sender).sendValue(entranceFee);, so attacker can do reentrancy attack during the callback to drain the contract.
The contract's balance will be drained.
Manual review
Rewrite the function:
reentrancy in refund() function
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.