Support mixed Truthtrance questions in Richese auctions
Verify and publish checkpoint container / container (push) Canceled after 0s
Verify and publish checkpoint container / container (push) Canceled after 0s
This commit is contained in:
1 parent
1f3bc349ba
commit
6ce9a4b4a7
16 files changed
+504
-10
No files matched your search
@@ -31,16 +31,37 @@ const config: MixedActionConfig<BidActionClaim> = {
|
||||
</>,
|
||||
};
|
||||
|
||||
export function mixedBidInputError(value: unknown, game: GameView, target: string): string | null {
|
||||
return mixedActionInputError(value, game, target, config);
|
||||
const richeseConfig: MixedActionConfig<BidActionClaim> = {
|
||||
...config,
|
||||
prefix: 'mixed-richese-bid',
|
||||
legend: 'Mixed current-fact / future Richese-lot bid claim',
|
||||
actionLabel: 'Richese-lot bid condition',
|
||||
actionTiming: 'Future bid · this Richese lot',
|
||||
actionHelp: <>Count the one remaining accepted bid declaration after the answer in this Richese lot.
|
||||
A qualifying bid does not promise a win; normal funding, bidding and winning-payment rules still apply.
|
||||
In a Silent auction, submitted bid amounts stay private until the native reveal.
|
||||
An unknown current fact uses a future commitment that guarantees the whole answer;
|
||||
otherwise the answer is I don’t know.</>,
|
||||
fallbackError: 'Choose a current fact and a future Richese-lot bid condition.',
|
||||
};
|
||||
|
||||
export function mixedBidInputError(value: unknown, game: GameView, target: string, variant: 'ordinary' | 'richese' = 'ordinary'): string | null {
|
||||
return mixedActionInputError(value, game, target, variant === 'richese' ? richeseConfig : config);
|
||||
}
|
||||
export function MixedBidFields(props: {
|
||||
value: MixedActionExpression<BidActionClaim>;
|
||||
game: GameView;
|
||||
target: string;
|
||||
disabled: boolean;
|
||||
variant?: 'ordinary' | 'richese';
|
||||
onChange: (expression: MixedActionExpression<BidActionClaim>) => void;
|
||||
}) {
|
||||
if (props.variant === 'richese') {
|
||||
const method = props.game.richeseAuction?.method;
|
||||
const selected = method === 'silent' ? 'Silent' : 'Once Around';
|
||||
return MixedActionFields({ ...props, config: { ...richeseConfig,
|
||||
legend: `${richeseConfig.legend} · Turn ${props.game.turn} · ${selected}` } });
|
||||
}
|
||||
const lot = props.game.bidPromiseLot;
|
||||
return MixedActionFields({ ...props, config: lot
|
||||
? { ...config, legend: `${config.legend} · Turn ${lot.turn} · Ordinary lot ${lot.lot}` }
|
||||
|
||||
Reference in new issue
Block a user