From 78ad9d1b77ace75e583df1fc422d0225f086dc47 Mon Sep 17 00:00:00 2001 From: Robert Ying Date: Sat, 20 Jan 2024 13:37:11 -0800 Subject: [PATCH] frontend --- frontend/src/Initialize.tsx | 4 +++ frontend/src/gen-types.d.ts | 4 +-- frontend/src/gen-types.schema.json | 47 +++++++++++++++++++++++------- 3 files changed, 42 insertions(+), 13 deletions(-) diff --git a/frontend/src/Initialize.tsx b/frontend/src/Initialize.tsx index dbd02ba..abda0ba 100644 --- a/frontend/src/Initialize.tsx +++ b/frontend/src/Initialize.tsx @@ -1244,6 +1244,10 @@ const Initialize = (props: IProps): JSX.Element => { + diff --git a/frontend/src/gen-types.d.ts b/frontend/src/gen-types.d.ts index 81d7d73..e30cc64 100644 --- a/frontend/src/gen-types.d.ts +++ b/frontend/src/gen-types.d.ts @@ -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"; diff --git a/frontend/src/gen-types.schema.json b/frontend/src/gen-types.schema.json index 07d1fbd..44b2ae9 100644 --- a/frontend/src/gen-types.schema.json +++ b/frontend/src/gen-types.schema.json @@ -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": { @@ -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": {