smerriman Posted August 12, 2022 Report Share Posted August 12, 2022 It looks like the old 1-character bug has been fixed - yay :) Unfortunately, an extra line of code was added at the same time which is causing more regular issues. Here's a silly hand diagram demonstrating the problem clearly, though it actually pops up on nearly every hand. [hv=https://www.bridgebase.com/tools/handviewer.html?a=1NPPP&d=e&s=SA32HAKQDAKQcAKQJ&w=SKQT9754H432D32C2&n=S86HJT98DJT9CT987&p=SAS4S6SJS3]400|300[/hv] Click through to after the lead to trick 2 and click GIB to see missing results for the T, 9, and 5. Specifically, any time two cards that weren't originally equals now are due to the intermediate cards having been played on earlier tricks, the lower cards never show a double dummy score. This is due to a new line of code which been added (wasn't there last time I checked) - the long line with the comment here: for (c = card; c >= 0; c--) { if (deck[suit][c] >= 0 && deck[suit][c] != whosTurn) { break; } if (deck[suit][c] < 0 && deck[suit][c] - 4 != whosTurn) { // played card belongs to someone else? note that deck[suit][c] is set to whosTurn-4 in playCard(..) once a card is played break; } if (deck[suit][c] >= 0) { if (gibDivs[suit][c].parentNode != div) { div.appendChild(gibDivs[suit][c]); if (tricks >= goal) { gibDivs[suit][c].style.background = '#B0D57E'; gibDivs[suit][c].style.color = '#000000'; if (tricks == goal) { div.lastChild.innerHTML = '='; } else { div.lastChild.innerHTML = tricks - goal; } } else { div.lastChild.style.background = '#CB0000'; div.lastChild.style.color = '#FFFFFF'; div.lastChild.innerHTML = goal - tricks; } } } else { var inThisTrick = false; for (var it = 0; it <= inTrick; it++) { if (suitPlayed[trick][it] == suit && rankPlayed[trick][it] == c) { inThisTrick = true; break; } } if (inThisTrick == true) { break; } } The server request only returns scores for cards that really aren't equals (SK and S7), with this loop in the handviewer code meant to apply the same score to the remaining equals. But the commented line specifically tests if the next card was played by another hand on an earlier trick, and stops adding scores. It's only meant to stop if the card hasn't been played, or was played by another hand to the *same* trick, which is what the later inThisTrick part does. So that line of code shouldn't be there. Quote Link to comment Share on other sites More sharing options...
smerriman Posted January 9, 2023 Author Report Share Posted January 9, 2023 This is still broken. Saw a streamer looking at double dummy results and getting very confused because of this the other day. Quote Link to comment Share on other sites More sharing options...
barmar Posted February 10, 2023 Report Share Posted February 10, 2023 The line you refer to was supposedly part of this fix for this earlier problem https://www.bridgebase.com/forums/topic/84587-gib-makes-dd-error/page__view__findpost__p__1013211. We're looking into it. We originally made the change from < to <= that you suggested, but that didn't fix all the problems, so this was done later and we thought it was the complete fix. Quote Link to comment Share on other sites More sharing options...
barmar Posted February 14, 2023 Report Share Posted February 14, 2023 The problem wasn't related to that added line. I believe we've fixed it. Quote Link to comment Share on other sites More sharing options...
pescetom Posted February 14, 2023 Report Share Posted February 14, 2023 The problem wasn't related to that added line. I believe we've fixed it. Maybe you could restore the tricks-enabled version of Dealer while you have your hands dirty? ;) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.