Draft
Bridge: SAYC Openings
Loading description...
Games
Algorithms
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Okay, this kata should be sent to draft, because the reference solution doesn't even cohere to the description:
no voids, no singletons, no five-card majors
. This is not the standard definition of a balanced hand (no voids, no singletons, at most one doubleton
)2C
rule is wrong: see issue below3-3
and4-4
, which isopen 1D/1C if 3+ D/C cards, take the longer suit, then suit rank if equal
5-5
/6-6
D/C cards respectively (expects1D
instead of1C
, which is the higher suit)NT
>2C
> Major opener (longest suit > highest suit) > Minor opener (4-4
>3-3
> longest suit > highest suit), which I don't think is correct in practiceIn the actual tests
AC KD KC AD 5S TH 9D 2H TS AH KS 2C JS
expects2C
, but this is a balanced hand (4-3-3-3
).The rule in the description is wrong: it's actually
With 22+ point, if not legible for 3NT, open 2C
.The current version of SAYC says
Notrump openings show a balanced hand and may be made with a five-card major suit or a five-card minor suit
. Notably, suits are not limited to minor suit.(I think most SAYC variants does this as well AFAIK)
I'm extremely sure this rule is intended to be at least the specified number of top honours, not the exact amount of honors.
The description is only describing part of the actual bidding rules: rules for
pass
aren't explained. Are we supposed topass
when no bidding criteria are met?Also, what was the suit order again? It is not universally
DCHS
in every card game.What if there are, say, 6 Spades and 7 Hearts? Which one takes precedence?
What should be the number?
1
, or number of the cards of that suit?Then why does
7H 8D AD KC 9H KH 5D AS 7C 9C QC 3S 8H
return1N
? Both minor suits have4
and3
respectively. Are you refering to the sum of cards for both minor suits?How is "balanced hand" (or "unbalanced hand") defined?
What is a
top 3
honour?AKQ
?What is a
long suit
? What if there are multiple long suits?It is not mentioned that at least 5 cards are required for Weak Two Bidding (aka the second portion of the bidding rule).
This hasn't come up before, and the code is validating fine. Is this happening to you every time you run your code?
You forgot to
from collections import Counter
yourself in the test fixture.I added it this morning when I first saw your message. Did that fix the problem for you? It's frustrating that the system didn't tell me there was a problem. You're the first person to mention it. Hopefully it's working for you now.
Well, it's due to the new runner which stops concatenation user code with the tests, mandating the tests to import the libraries themselves.
2C
,3N
,4H
)?!?
Shouldn't that be
1
and7
?Haha! Yup :) Sorry about that.
This comment has been hidden.
Sorry. This was my first kata, so I wasn't sure how to add random tests. I just added them now. Thanks!
No problem, was just a hint, thanks for the work;-)!