Summary: | Error picking winner when both players have 2-pair hands | ||
---|---|---|---|
Product: | [Applications] kpoker | Reporter: | Unknown <null> |
Component: | general | Assignee: | Andreas Beckermann <b_mann> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | PhoenixMalizia |
Priority: | NOR | ||
Version: | 0.7 | ||
Target Milestone: | --- | ||
Platform: | RedHat Enterprise Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
tauchris
2001-08-05 01:58:50 UTC
I can confirm this one: I have 2 jacks and 2 fours, computer has 2 tens and 2 fives and the computer wins. Which it shouldn't, as jacks beat tens. Replaced tauchris@yahoo.com with null@kde.org due to bounces by reporter it's same for me. i have 2-Aces and 2-fours, the computer have 2-Jacks and 2-nines, then the computer wins. it's wrong, because Aces beat Jacks. I have looked at the code, and the bug is indeed there. The program only checks the winner by adding the scores for the cards. This works for almost all combinations, but not for two pairs and I believe not for a full hand. I will look into the problem and try to fix it, if I am allowed by the maintainers. maybe its the wrong winner because the game see only one pair instead of two. see bug#51140 and bug#70903 CVS commit by ingwa: Completely rewrite of the valuation of a poker hand. This patch fixes all valuation bugs as far as I know, and it is tested pretty thoroughly. I played so much that I managed to once get four Aces(!) and once a straight flush(!!). Never got a royal flush, though. There are still a couple of debug messages left for other testers than me. I will remove them in a few days. Refer to bug 30272 - Error picking winner when both players have 2-pair hands Refer to bug 70903 - kpoker identifies only one pair Refer to bug 71693 - all cards are blinking (computer have just two pairs) CCMAIL: 30272-done@bugs.kde.org CCMAIL: 70903-done@bugs.kde.org CCMAIL: 71693-done@bugs.kde.org M +28 -2 kpaint.cpp 1.23 M +51 -0 kpoker.cpp 1.72 M +0 -17 kpoker.h 1.33 M +521 -18 player.cpp 1.14 M +193 -9 player.h 1.9 M +6 -1 playerbox.cpp 1.10 M +30 -0 testers.cpp 1.7 *** Bug 138110 has been marked as a duplicate of this bug. *** |