In the current game design, when a player wins early by coming on top for (turns / 2 + 1) turns, he still needs to play on to finish the game and get the prize, until:
all turns are completed or
commitMove + revealMove followed by calling timeoutReveal in order to finish the game and get the prize.
Losing player can call timeoutReveal and cancel game, resulting in refunds for both players
Game is canceled, Prize is lost for the winner
Manual Code Review
Add an early winner check in _determineWinner
function _determineWinner(uint256 _gameId) internal {
Game storage game = games[_gameId];
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.