Compose market, early cache and phase bid promises
Verify and publish checkpoint container / container (push) Successful in 12m4s
Verify and publish checkpoint container / container (push) Successful in 12m4s
This commit is contained in:
1 parent
225b2174ad
commit
6a30fdf376
16 files changed
+1183
-21
No files matched your search
@@ -16,15 +16,23 @@ export function MixedRicheseBidPromises(props: { game: GameView; busy: boolean;
|
||||
const live = !!auction && own.some(promise => promise.turn === game.turn && promise.event === auction.event &&
|
||||
!promise.fulfilled && !promise.released);
|
||||
const action = guide?.action, signature = action && 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 isCurrentGuide = () => {
|
||||
if (props.game !== game || !auction || game.richeseAuction !== auction ||
|
||||
!guide || game.richeseBidPromiseGuide !== guide || !action || guide.action !== action ||
|
||||
JSON.stringify(action) !== signature || action.type !== 'richeseBid' || action.event !== auction.event ||
|
||||
(progress !== null && JSON.stringify([auction.active,auction.bid,auction.bidder,
|
||||
auction.acted,auction.submitted,auction.ownBid]) !== progress) ||
|
||||
typeof action.richeseBidPromiseId !== 'string') return false;
|
||||
if (action.phaseAnyBidPromiseEvent !== undefined &&
|
||||
(typeof action.phaseAnyBidPromiseEvent !== 'string' || action.phaseAnyBidLotEvent !== auction.event ||
|
||||
!game.phaseAnyBidPromises.some(promise => promise.event === action.phaseAnyBidPromiseEvent &&
|
||||
promise.player === game.me && promise.turn === game.turn && !promise.fulfilled && !promise.released))) return false;
|
||||
if (action.earlyRicheseBidPromiseId !== undefined &&
|
||||
(typeof action.earlyRicheseBidPromiseId !== 'string' ||
|
||||
!game.ownEarlyRicheseBidPromises.some(promise => promise.id === action.earlyRicheseBidPromiseId &&
|
||||
promise.player === game.me && promise.turn === game.turn && !promise.boundEvent && !promise.fulfilled && !promise.released))) return false;
|
||||
return game.mixedRicheseBidPromises.some(promise => promise.player === game.me &&
|
||||
promise.id === action.richeseBidPromiseId && promise.turn === game.turn &&
|
||||
promise.event === auction.event && !promise.fulfilled && !promise.released);
|
||||
|
||||
Reference in new issue
Block a user