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

Poker problem refers to non-specific Wikipedia rules #1521

Closed
asarkar opened this issue Jul 3, 2022 · 2 comments
Closed

Poker problem refers to non-specific Wikipedia rules #1521

asarkar opened this issue Jul 3, 2022 · 2 comments
Labels
good first issue An improvement or bug fix that favors new contributors help wanted We need your help to improve the track! By taking on this task.

Comments

@asarkar
Copy link

asarkar commented Jul 3, 2022

Poker refers to Wikipedia for the rules, but there's no specific/clear rule in Wikipedia. For example:

A straight flush is a hand that contains five cards of sequential rank, all of the same suit, such as Q♥ J♥ 10♥ 9♥ 8♥ (a "queen-high straight flush").[4] It ranks below five of a kind and above four of a kind.[5] Under high rules, an ace can rank either high (as in A♥ K♥ Q♥ J♥ 10♥, an ace-high straight flush) or low (as in 5♦ 4♦ 3♦ 2♦ A♦, a five-high straight flush), but cannot simultaneously rank both high and low (so Q♣ K♣ A♣ 2♣ 3♣ is an ace-high flush, but not a straight).[6][13] Under deuce-to-seven low rules, an ace always ranks high (so 5♠ 4♠ 3♠ 2♠ A♠ is an ace-high flush). Under ace-to-six low rules, an ace always rank low (so A♥ K♥ Q♥ J♥ 10♥ is a king-high flush).[14] Under ace-to-five low rules, straight flushes are not possible (so 9♣ 8♣ 7♣ 6♣ 5♣ is a nine-high hand).[7]

Few of many different interpretations are given below:

Under high rules, an ace can rank either high

Under ace-to-six low rules, an ace always rank low

The question doesn't say, so, the student has no way of knowing which of these many rulesets should be used to solve this problem. And this is just one hand, all of the other hands are defined in a similarly confusing way.

The problem can be clearly defined by actually stating the rules the author has in mind in the question.

@coriolinus
Copy link
Member

Specifically, the instructions at https://github.com/exercism/rust/blob/main/exercises/practice/poker/.docs/instructions.md point to this Wiki page.

High rules are in use for this exercise. This could usefully be added to the problem documentation.

@coriolinus coriolinus added good first issue An improvement or bug fix that favors new contributors help wanted We need your help to improve the track! By taking on this task. labels Jul 4, 2022
@senekor
Copy link
Contributor

senekor commented Sep 10, 2023

Belongs in problem specs, where this issue already exists: exercism/problem-specifications#2153

@senekor senekor closed this as completed Sep 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue An improvement or bug fix that favors new contributors help wanted We need your help to improve the track! By taking on this task.
Projects
None yet
Development

No branches or pull requests

3 participants