Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible incorrect hand evaluation #6

Open
eukrit opened this issue Jan 22, 2021 · 5 comments
Open

Possible incorrect hand evaluation #6

eukrit opened this issue Jan 22, 2021 · 5 comments

Comments

@eukrit
Copy link

eukrit commented Jan 22, 2021

Could you have a look at my screenshot? I think the hand evaluation is wrong because that is not supposed to be straight.
2021-01-23_4-04-45

`
from card import *
from evaluator import *
from deck import *

deck = Deck()

board = deck.draw(5)
print(Card.print_pretty_cards(board))

evaluator = Evaluator()

players = [deck.draw(2) for i in range(10)]
for i in range(len(players)):
handstr = Card.print_pretty_cards(players[i])
evalint = evaluator.evaluate(board, players[i])
ranknum = evaluator.get_rank_class(evalint)
rankname = evaluator.class_to_string(ranknum)

  print('Hand: ' + handstr + 'Eval :' + str(evalint) +
        ', Rank No. ' + str(ranknum) + ' [' + rankname + ']')

`

@ihendley
Copy link
Owner

ihendley commented Jan 22, 2021

Hi eukrit, this does look like a straight to me: TJQKA, also known as a broadway straight. I think everything is working as expected.

@eukrit
Copy link
Author

eukrit commented Jan 23, 2021

Oh yeah your're right! I was confused with T. Sorry ihendley.

@eukrit
Copy link
Author

eukrit commented Jan 23, 2021

Hi idendley, I think it doesn't work with an empty board. I'm trying to evaluate the player's hand here. (Two Cards)

image

@PacPalCent
Copy link

@ihendley Hi! I met an issue with Royal Flash combination. Is it known issue?
Снимок экрана 2021-10-16 в 21 33 21

@ihendley
Copy link
Owner

ihendley commented May 4, 2022

Regarding evaluating an empty board - that is not supported. I have removed the comment in the docstring claiming otherwise.

I have also added a Royal Flush hand rank class, so you should see "Royal Flush" instead of "Straight Flush" if you re-run your example on the latest treys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants