-
Notifications
You must be signed in to change notification settings - Fork 96
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
Add new game Zwanzigerrufen #995
Conversation
2544094
to
12e6de8
Compare
Looks great! I had a busy day today so I will get to your PR tomorrow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added some comments in the code to clarify what happens in this PR.
const highest_bid = Math.max(...G.players.map((P) => P.bid)); | ||
const all_bids = [0, 1, 2, 3, 4]; | ||
const all_bids = [Contract.Pass, Contract.Small, Contract.Guard, Contract.GuardWithout, Contract.GuardAgainst]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Part of this PR just replaces plain numbers in frenchTarot by enums.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great, this is much better
"description": "Jogo de Cartas da Áustria Oriental", | ||
"descriptionTag": "Jogue Zwanzigerrufen online!", | ||
"instructions": { | ||
"text": "Para uma descrição do jogo, por favor leia a página da Wikipedia: https://en.wikipedia.org/wiki/Zwanzigerrufen\n\nToda a arte usada nessa implementação é do baralho de cartas \"Industrie und Glück\" da primeira metade do século XIX e disponível no domínio público: https://en.wikipedia.org/wiki/Industrie_und_Gl%C3%BCck" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check the portuguese translation, I just took some strings from other card games and used a translator for the rest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pretty good job :)
const Template = ({ color, value, pattern, ...rest }) => { | ||
return <Card pattern={pattern} type={{ color: color, value: value }} {...rest} />; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The storybook template for the Card
component now gives select
and range
controls to specify the CardColor and value of the card.
[col, row] = cardBlank; | ||
text = `CardColor.${CardColor[C.color]} is not available with the ${props.pattern} pattern.`; | ||
text += ` Supported colors are: ${colors.map((c) => CardColor[c]).join(', ')}.`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unsupported combinations of CardColor and Pattern now cause the Card
component to show a blank card with an error message string on it. This should only be relevant for the storybook page. In real games, this should never happen if the game is correctly implemented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tuxor1337 is "color" the suit (club, hearts, spades, diamonds)? I noticed the name in my examination and thought it might be. Suggest we refactor that name but I defer to your choice; it might make the reuse better understood if we provide an alias to the common name (in English).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that the terminology is mixed up. Most occurrences of "color" should be "suit". I'm sorry for this confusion which comes from my native language German, where the two words have the same meaning in the context of card games.
However, since this requires major changes to all of my card game implementations, I prepared a separate PR to address the issue for all card games and the shared card components at once. I will open that PR once this PR is merged.
if (props.pattern == Pattern.Tarock) { | ||
width_min = 60; | ||
width_max = 90; | ||
visible_ratio = 0.6; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the card hand that is "fanned out" so that cards overlap, the overlap of the cards does now depend on the specified card pattern. Since the (new) Tarock pattern doesn't have numbers/letters in the four corners, the overlap needs to be smaller so that a larger part of the graphics are visible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In English (sorry for the ethnocentric reference) the tarot are referred to in their major, and minor, "arcana" don't know if your game is a reference to the traditional "oracle" (fortune teller cards)? The arcana in English translate roughly to Canes, Cups, Coins, Swords the Latin (Fr.?) Clubs, Hearts, Diamonds, Spades see this article maybe alias' would make this clearer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a card game context, the French suits Clubs, Hearts, Diamonds, Spades are much more common for card games in the Tarot/Tarock-family, see https://en.wikipedia.org/wiki/Tarot_card_games
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a card game context, the French suits Clubs, Hearts, Diamonds, Spades are much more common for card games in the Tarot/Tarock-family, see https://en.wikipedia.org/wiki/Tarot_card_games
Understood. Does the typing support alias'? Perhaps we could support both. I've never played your game but the ref'd link above speaks to the common names in English, Latin, Fr. arcana (suits).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand your idea: Which alias would you like to have for which existing type?
@@ -4,7 +4,6 @@ | |||
bottom: 0; | |||
left: 0; | |||
right: 0; | |||
margin: 15px 15px 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The arrangement of the player zones on the screen is still (and will definitely remain) subject to improvements from time to time. This is really hard for 4 and 5 player games since the layout should be responsive to support both small and large screens in both landscape and portrait mode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some ideas there... I'll be adding some suggestions if you're willing to consider them. The cardinal directions and the player positions should be relative so If I sit north the clockwise play would be north (self), east, south, west in four player games. I want to work on a table concept that allows the players to choose one of these four seats before entering a game -- this could be reused between ALL games as a way to arrange partnerships play order etc. I think showing the card top 1/3 is usually enough in standard playing cards to establish card identity so you can make a hand that is very compact. in each of the cardinal directions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In contract bridge @vdfdev the most popular card game globally by far duplicate tournament play is organized in n-s/e-w partnerships. The hands are common to all partners played out in standardized rotations (I don't know these but my parents were life master players in the ACBL) and the round consists of 3 "hands" played out in identical sets of cards for each direction -- all permutations make up the tournament so each pair is awarded a score for each of the hands. This is adds to your LIFE MASTER score which makes you eligible for global rankings. In some countries they broadcast these finals annually to HUGE audiences ... If you want some traffic, I believe a good bridge teach/play/tournament facility will immediately show results. /$0.02
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe let's discuss this in a different context, e.g. in a GitHub issue or on discord.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe let's discuss this in a different context, e.g. in a GitHub issue or on discord.
This adds an implementation of the eastern Austrian game Zwanzigerrufen which is a simplified version of Königrufen:
The new card pattern is a traditional Tarock pattern used in Austria since the early 19th century, hence it is public domain.
While implementing this game, I fixed #992 and some other card game-related UI stuff.
Checklist
master
).