$hash = sha256( $secret . "-" . $gameId );
$taker_rnd = hash('sha256', $rawRnd);
$entireHash = hash('sha256', ($secret . $taker_rnd));
$winnerIndex = hexdec( substr( $entireHash, 0, 2 )) % 2;
WinnerIndex is either 0 or 1: 0 = maker wins, 1 = taker wins.