Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump rustworkx from 0.15.1 to 0.16.0 #70

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
6 changes: 3 additions & 3 deletions client/material.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ export function updateMaterial(variant: Variant, fen: string, vmaterialTop: VNod
];
}

export function emptyMaterial(variant: Variant): [VNode, VNode] {
export function emptyMaterial(variant: Variant, vmaterialTop: VNode | HTMLElement, vmaterialBottom: VNode | HTMLElement): [VNode, VNode] {
return [
makeMaterialVNode(variant, 'top', [], true),
makeMaterialVNode(variant, 'bottom', [], true),
patch(vmaterialTop, makeMaterialVNode(variant, 'top', [], true)),
patch(vmaterialBottom, makeMaterialVNode(variant, 'bottom', [], true)),
];
}
2 changes: 1 addition & 1 deletion client/roundCtrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ export class RoundController extends GameController {
if (this.variant.material.showDiff && this.materialDifference)
[this.vmaterial0, this.vmaterial1] = updateMaterial(this.variant, this.fullfen, this.vmaterial0, this.vmaterial1, this.flipped(), this.mycolor);
else
[this.vmaterial0, this.vmaterial1] = emptyMaterial(this.variant);
[this.vmaterial0, this.vmaterial1] = emptyMaterial(this.variant, this.vmaterial0, this.vmaterial1);
}

private setPremove = (orig: cg.Orig, dest: cg.Key, metadata?: cg.SetPremoveMetadata) => {
Expand Down
4 changes: 3 additions & 1 deletion client/variants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ export interface Variant {
readonly alternateStart?: Record<string, string>;
}

const pieceFamiliesWithMaterialDifferenceSupported = ["standard", "makruk", "sittuyin", "asean", "xiangqi", "janggi", "shatranj", "capa", "dragon", "seirawan", "shako", "hoppel", "orda", "khans", "synochess", "shinobi", "empire", "ordamirror", "chak", "spartan"];

function variant(config: VariantConfig): Variant {
return {
name: config.name,
Expand Down Expand Up @@ -190,7 +192,7 @@ function variant(config: VariantConfig): Variant {
noDrawOffer: !!config.rules?.noDrawOffer,
},
material: {
showDiff: !config.pocket?.captureToHand && !['alice', 'fogofwar'].includes(config.name),
showDiff: !config.pocket?.captureToHand && !['ataxx', 'fogofwar', 'horde'].includes(config.name) && pieceFamiliesWithMaterialDifferenceSupported.includes(config.pieceFamily),
initialDiff: calculateDiff(config.startFen, BOARD_FAMILIES[config.boardFamily].dimensions, config.material?.equivalences ?? {}, !!config.pocket?.captureToHand),
equivalences: config.material?.equivalences ?? {},
},
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ log4mongo==1.8.1
pyopenssl==25.0.0
pyffish==0.0.86
pyffish_alice==0.0.1
rustworkx==0.15.1
rustworkx==0.16.0
sortedcollections==2.1.0
tzdata==2024.2
python-gettext==5.0
Expand Down
63 changes: 62 additions & 1 deletion static/images/pieces/mono/advisor.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
90 changes: 90 additions & 0 deletions static/images/pieces/mono/banner.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading