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

+9 -2
View File
@@ -14,7 +14,8 @@ export function PhaseAnyBidGuideButton(props: Props) {
const signature = JSON.stringify(action), ordinary = game.auction, special = game.richeseAuction;
const ordinarySignature = ordinary && JSON.stringify([ordinary.bid, ordinary.bidder, ordinary.active, ordinary.remaining]);
const specialSignature = special && JSON.stringify([special.event, special.method, special.active,
special.bid, special.bidder, special.submitted, special.ownBid]);
special.bid, special.bidder, special.submitted, special.ownBid,
...(action.earlyRicheseBidPromiseId !== undefined ? [special.acted] : [])]);
const canAct = () => {
const current = props.game, me = current.players.find(player => player.id === actor);
if (props.busy || current !== game || current.me !== actor || current.turn !== turn ||
@@ -31,6 +32,11 @@ export function PhaseAnyBidGuideButton(props: Props) {
promise.id === action.richeseBidPromiseId && promise.player === actor && promise.turn === turn &&
promise.event === special.event && !promise.fulfilled && !promise.released)) return false;
}
if (action.earlyRicheseBidPromiseId !== undefined &&
(typeof action.earlyRicheseBidPromiseId !== 'string' ||
!current.ownEarlyRicheseBidPromises.some(promise =>
promise.id === action.earlyRicheseBidPromiseId && promise.player === actor && promise.turn === turn &&
!promise.boundEvent && !promise.fulfilled && !promise.released))) return false;
if (action.bidPromiseEvent !== undefined) {
if ((action.type !== 'bid' && action.type !== 'passBid') || typeof action.bidPromiseEvent !== 'string' ||
typeof action.phaseAnyBidLot !== 'number' || current.bidPromiseLot?.turn !== turn ||
@@ -47,7 +53,8 @@ export function PhaseAnyBidGuideButton(props: Props) {
if (action.type !== 'richeseBid' || !special || current.richeseAuction !== special ||
special.event !== action.event || special.event !== action.phaseAnyBidLotEvent ||
JSON.stringify([special.event, special.method, special.active, special.bid, special.bidder,
special.submitted, special.ownBid]) !== specialSignature) return false;
special.submitted, special.ownBid,
...(action.earlyRicheseBidPromiseId !== undefined ? [special.acted] : [])]) !== specialSignature) return false;
return special.method === 'silent' ? !special.submitted.includes(actor) : special.active === actor;
};
return <Button className="game-action min-h-11 whitespace-normal" data-testid="phase-any-bid-guide"