Skip to content

Commit

Permalink
frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
rbtying committed Jan 20, 2024
1 parent 83a6049 commit 78ad9d1
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 13 deletions.
4 changes: 4 additions & 0 deletions frontend/src/Initialize.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1244,6 +1244,10 @@ const Initialize = (props: IProps): JSX.Element => {
<option value="OnlyDrawTractorOnTractor">
Only tractors can draw tractors
</option>
<option value="LongerTuplesProtectedAndOnlyDrawTractorOnTractor">
Longer tuples are protected from shorter, and only tractors can
draw tractors
</option>
<option value="NoFormatBasedDraw">
No format-based requirements (pairs do not draw pairs)
</option>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/gen-types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,10 @@ export type BonusLevelPolicy =
export type KittyPenalty = "Times" | "Power";
export type KittyBidPolicy = "FirstCard" | "FirstCardOfLevelOrHighest";
export type TrickDrawPolicy =
| "NoProtections"
| ("NoProtections" | "NoFormatBasedDraw")
| "LongerTuplesProtected"
| "OnlyDrawTractorOnTractor"
| "NoFormatBasedDraw";
| "LongerTuplesProtectedAndOnlyDrawTractorOnTractor";
export type ThrowPenalty = "None" | "TenPointsPerAttempt";
export type ThrowEvaluationPolicy = "All" | "Highest" | "TrickUnitLength";
export type PlayTakebackPolicy = "AllowPlayTakeback" | "NoPlayTakeback";
Expand Down
47 changes: 36 additions & 11 deletions frontend/src/gen-types.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -640,11 +640,22 @@
"enum": ["JokerOrHigherSuit", "JokerOrGreaterLength", "GreaterLength"]
},
"BidReinforcementPolicy": {
"type": "string",
"enum": [
"ReinforceWhileWinning",
"OverturnOrReinforceWhileWinning",
"ReinforceWhileEquivalent"
"oneOf": [
{
"description": "A bid can be reinforced when it is the winning bid.",
"type": "string",
"enum": ["ReinforceWhileWinning"]
},
{
"description": "A bid can be reinforced when it is the winning bid, or overturned with a greater bid.",
"type": "string",
"enum": ["OverturnOrReinforceWhileWinning"]
},
{
"description": "A bid can be reinforced if it is equivalent to the winning bid after reinforcement.",
"type": "string",
"enum": ["ReinforceWhileEquivalent"]
}
]
},
"BidTakebackPolicy": {
Expand Down Expand Up @@ -3131,12 +3142,26 @@
}
},
"TrickDrawPolicy": {
"type": "string",
"enum": [
"NoProtections",
"LongerTuplesProtected",
"OnlyDrawTractorOnTractor",
"NoFormatBasedDraw"
"oneOf": [
{
"type": "string",
"enum": ["NoProtections", "NoFormatBasedDraw"]
},
{
"description": "Don't require longer tuples to be drawn if the original format was a shorter tuple.",
"type": "string",
"enum": ["LongerTuplesProtected"]
},
{
"description": "Only allow tractors to be drawn if the original format was also a tractor.",
"type": "string",
"enum": ["OnlyDrawTractorOnTractor"]
},
{
"description": "Both `LongerTuplesProtected` and `OnlyDrawTractorOnTractor`",
"type": "string",
"enum": ["LongerTuplesProtectedAndOnlyDrawTractorOnTractor"]
}
]
},
"TrickFormat": {
Expand Down

0 comments on commit 78ad9d1

Please sign in to comment.