Compose market, early cache and phase bid promises
Verify and publish checkpoint container / container (push) Successful in 12m4s

This commit is contained in:
Quintine committed 2026-11-16 20:51:03 +11:00
1 parent 225b2174ad
commit 6a30fdf376
16 files changed
+1183 -21

No files matched your search

+12 -1
View File
@@ -17,7 +17,10 @@ export type RicheseBidPromisePanelProps = {
guide: { action: Action } | null;
game: { turn: number; me?: string;
phaseAnyBidPromises?: {event: string; player: string; turn: number; fulfilled?: boolean; released?: boolean}[];
richeseAuction: { event: string; method?: 'onceAround' | 'silent' | 'normal' } | null };
ownEarlyRicheseBidPromises?: {id: string; player: string; turn: number; boundEvent?: string; fulfilled?: boolean; released?: boolean}[];
richeseAuction: { event: string; method?: 'onceAround' | 'silent' | 'normal';
active?: string | null; bid?: number; bidder?: string | null; acted?: readonly string[];
submitted?: readonly string[]; ownBid?: number | null } | null };
act: (action: Action) => void;
busy: boolean;
};
@@ -29,16 +32,24 @@ export function RicheseBidPromiseGuide(props: RicheseBidPromisePanelProps) {
const auction = game.richeseAuction, turn = game.turn, action = guide.action;
const auctionEvent = action.event, id = action.richeseBidPromiseId;
const signature = JSON.stringify(action);
const progress = action.earlyRicheseBidPromiseId !== undefined && auction ?
JSON.stringify([auction.active,auction.bid,auction.bidder,auction.acted,auction.submitted,auction.ownBid]) : null;
const isCurrent = () => props.game === game && props.guide === guide &&
props.guide.action === action && JSON.stringify(action) === signature &&
game.turn === turn && !!auction && game.richeseAuction === auction &&
typeof auctionEvent === 'string' && auction.event === auctionEvent &&
(progress === null || JSON.stringify([auction.active,auction.bid,auction.bidder,
auction.acted,auction.submitted,auction.ownBid]) === progress) &&
typeof id === 'string' && action.type === 'richeseBid' &&
(action.phaseAnyBidPromiseEvent === undefined ||
typeof action.phaseAnyBidPromiseEvent === 'string' && action.phaseAnyBidLotEvent === auctionEvent &&
typeof game.me === 'string' && !!game.phaseAnyBidPromises?.some(promise =>
promise.event === action.phaseAnyBidPromiseEvent && promise.player === game.me && promise.turn === turn &&
!promise.fulfilled && !promise.released)) &&
(action.earlyRicheseBidPromiseId === undefined ||
typeof action.earlyRicheseBidPromiseId === 'string' && typeof game.me === 'string' &&
!!game.ownEarlyRicheseBidPromises?.some(promise => promise.id === action.earlyRicheseBidPromiseId &&
promise.player === game.me && promise.turn === turn && !promise.boundEvent && !promise.fulfilled && !promise.released)) &&
props.promises.some(promise => promise.id === id && promise.turn === turn &&
promise.event === auctionEvent && !promise.fulfilled && !promise.released);
const canAct = () => !props.busy && isCurrent();