Coder Social home page Coder Social logo

Comments (7)

db0 avatar db0 commented on July 18, 2024

It could be one of the cards has the wrong value in the game. Which cards did you have?

from doomtown-reloaded-octgn.

Khudzlin avatar Khudzlin commented on July 18, 2024

I'm not sure exactly, but I can narrow it down: the 9 might be Dr Dawn Edwards, Xiong "Wendy" Cheng, Jarrett Blake or Cheatin' Varmint (possibly Bunkhouse, Morgan Research Institute or Mechanical Horse), the 8 might be Lane Healey, Pat's Perch, Cattle M Ranch or Force Field and the 7s might be Pinto or Auto-Revolver (possibly James Ghetty, Arnold McCadish, Androcles Broklehurst, Blake Ranch, Cattle Market, Run 'em down or Pinned Down).
All of those cards have the correct rank and suit in the deckbuilder. I looked specifically for 7s and 9s in the deckbuilder when making the deck (a 7 would be the likely culprit under your scenario),

from doomtown-reloaded-octgn.

Khudzlin avatar Khudzlin commented on July 18, 2024

After some thinking, I've come to the conclusion that the issue cannot be caused by an incorrect value. If one of the 7s was counted as a 5, 6, 10 or J, the hand would be a legal straight rather than a cheatin' one. Straights (like Dead Man's Hands, Straight Flushes and High Cards) are never cheatin', because they cannot possibly have 2 cards with the same value.

from doomtown-reloaded-octgn.

db0 avatar db0 commented on July 18, 2024

hm, yeah, you're right.

from doomtown-reloaded-octgn.

Khudzlin avatar Khudzlin commented on July 18, 2024

I have an idea about how to detect straights: determine the highest (h) and lowest (l) natural ranks (excluding jokers, and converting A to 1, J to 11, Q to 12 and K to 13, like for pulls) occuring in the hand and the number of jokers (j); the hand is a straight if h - l < 5 and h - l + j >= 4. For lowball, ignore the jokers and just check h - l = 4.

from doomtown-reloaded-octgn.

Khudzlin avatar Khudzlin commented on July 18, 2024

I've seen it again with General Store (Q of D), 2x Hex Slinging (J of C), Avie Cline (10 of S) and the Black Joker.

Shootout hand is 5: Straight (Cheatin'!) (10 Spades, Queen of Diamonds, Jack of Clubs, Jack of Clubs, Joker).

from doomtown-reloaded-octgn.

Khudzlin avatar Khudzlin commented on July 18, 2024

The problem is that numrank treats jokers as kings, giving them rank 13. So they need to be excluded when checking for straights. To avoid having jokers being treated as both jokers and kings, the while condition in straightchk needs to be changed to

while i < 4 - jokers:

from doomtown-reloaded-octgn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.