From: Benjamin Auder Date: Tue, 13 Apr 2021 08:51:18 +0000 (+0200) Subject: Fix Cwda X-Git-Url: https://git.auder.net/variants/Dynamo/current/doc/html/left.jpg?a=commitdiff_plain;h=b2f43cc30477acd48ab83ed8b792dd9521dab502;p=vchess.git Fix Cwda --- diff --git a/client/public/images/pieces/Cwda/bf.svg b/client/public/images/pieces/Cwda/bf.svg index 9d51bfc9..e11fbadf 100644 --- a/client/public/images/pieces/Cwda/bf.svg +++ b/client/public/images/pieces/Cwda/bf.svg @@ -17,7 +17,7 @@ viewBox="0 0 50 50" version="1.1" id="svg974" - sodipodi:docname="ba.svg" + sodipodi:docname="bh.svg" inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"> @@ -45,8 +45,8 @@ id="namedview976" showgrid="false" inkscape:zoom="2.3931818" - inkscape:cx="11.490991" - inkscape:cy="50.539966" + inkscape:cx="-24.258144" + inkscape:cy="55.343366" inkscape:window-x="0" inkscape:window-y="20" inkscape:window-maximized="0" @@ -124,124 +124,29 @@ + id="g14601" + transform="matrix(0.95,0,0,0.95,79.104503,1.6608693)"> + + id="path14591" + d="M -76.54764,4.8052049 -36.856271,44.496574" + style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.69328892;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + - - - - + id="path14595" + d="M -57.035497,4.3882787 -77.047951,24.400734 -56.701955,44.746729 -37.106426,25.151201 Z" + style="fill:none;stroke:#ffffff;stroke-width:1.69328892;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - - - - - - - - diff --git a/client/public/images/pieces/Cwda/bw.svg b/client/public/images/pieces/Cwda/bw.svg index e11fbadf..9d51bfc9 100644 --- a/client/public/images/pieces/Cwda/bw.svg +++ b/client/public/images/pieces/Cwda/bw.svg @@ -17,7 +17,7 @@ viewBox="0 0 50 50" version="1.1" id="svg974" - sodipodi:docname="bh.svg" + sodipodi:docname="ba.svg" inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"> @@ -45,8 +45,8 @@ id="namedview976" showgrid="false" inkscape:zoom="2.3931818" - inkscape:cx="-24.258144" - inkscape:cy="55.343366" + inkscape:cx="11.490991" + inkscape:cy="50.539966" inkscape:window-x="0" inkscape:window-y="20" inkscape:window-maximized="0" @@ -124,29 +124,124 @@ - + id="g5357" + style="opacity:1;fill:#1f1a17;fill-opacity:1" + transform="matrix(0.84130849,0,0,0.84130849,-76.526422,18.776438)"> - + id="path5349" + d="m 119.66608,20.578823 c 0.12511,0.773672 0.40427,1.44388 1.3,1.7 11.23011,-0.424319 16.82956,-5.233235 20.30001,-11.7 l 0.2,-2.099999 c -2.10707,-8.89280401 -8.15113,-13.4502442 -16.2,-15.8 -4.40015,-0.5317426 -7.59668,1.3815851 -10.20001,4.5 -2.59354,2.64077835 -4.39616,5.9439949 -5.3,10 -0.9084,3.60641 -5.79067,1.6990508 -4.9,-0.6 2.76583,-4.0566968 11.00069,-10.7605086 4.9,-12.3 -8.75831,-2.0518262 -7.05798,4.7061225 -5.2,6.20000004 1.23982,-0.5457366 2.00197,-1.22280981 2.4,-2.00000004 -0.25951,-0.4357328 -0.98217,-0.8162564 0,-1.4 0.5387,0.045976 0.81918,0.2856122 1,0.6 0,1 0.50403,1.1455069 -3.6,4 -7.640521,5.2325602 -3.73403,16.328533 2.94302,17.405035 2.93812,0.458135 3.4042,1.08673 5.28907,0.933469 0.49515,-0.04026 1.25166,0.522864 1.96791,0.561495 0.84449,-0.337075 4.5865,-0.641651 3.83596,-0.600198 0.37015,0.007 0.83701,-0.226033 1.09094,-0.03707 0.11828,0.08802 0.12726,0.435864 0.1731,0.637268 z" + style="fill:#1f1a17;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + id="path5353" + d="m 109.56608,17.578823 c -1.32838,4.066443 -4.04985,6.321863 -6.6,8.8 -0.20576,0.304421 0.14574,0.397532 1,0.3 3.90473,-1.863513 6.85963,-4.360243 8.1,-8 -0.78642,-0.41302 -1.31194,-1.08384 -2.5,-1.1 z" + style="fill:#1f1a17;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + + + + + + + + + + + + diff --git a/client/public/images/pieces/Cwda/wf.svg b/client/public/images/pieces/Cwda/wf.svg index 0e249758..4c993056 100644 --- a/client/public/images/pieces/Cwda/wf.svg +++ b/client/public/images/pieces/Cwda/wf.svg @@ -17,7 +17,7 @@ viewBox="0 0 50 50" version="1.1" id="svg974" - sodipodi:docname="wWaffle.svg" + sodipodi:docname="wFAD.svg" inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"> @@ -44,28 +44,17 @@ inkscape:window-height="1060" id="namedview976" showgrid="false" - inkscape:zoom="2.3931818" - inkscape:cx="8.4123423" - inkscape:cy="122.97195" + inkscape:zoom="1.6922351" + inkscape:cx="-130.52172" + inkscape:cy="183.98903" inkscape:window-x="0" inkscape:window-y="20" inkscape:window-maximized="0" inkscape:current-layer="svg974" - showguides="false" /> + showguides="false" + inkscape:snap-nodes="false" /> - - - - @@ -133,153 +122,31 @@ stop-opacity="0" id="stop3287" /> - - - - - + id="g14601" + transform="matrix(0.95,0,0,0.95,79.104503,1.6608693)"> - - - - - - - - - - - - + y="1.9701072" + x="-79.549507" + height="45.194798" + width="45.194798" + id="rect14589" + style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#1f1a17;stroke-width:1.5555681;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal" /> + + + id="path14595" + d="M -57.035497,4.3882787 -77.047951,24.400734 -56.701955,44.746729 -37.106426,25.151201 Z" + style="fill:none;stroke:#1f1a17;stroke-width:1.69328892;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - - - diff --git a/client/public/images/pieces/Cwda/ww.svg b/client/public/images/pieces/Cwda/ww.svg index 4c993056..0e249758 100644 --- a/client/public/images/pieces/Cwda/ww.svg +++ b/client/public/images/pieces/Cwda/ww.svg @@ -17,7 +17,7 @@ viewBox="0 0 50 50" version="1.1" id="svg974" - sodipodi:docname="wFAD.svg" + sodipodi:docname="wWaffle.svg" inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"> @@ -44,17 +44,28 @@ inkscape:window-height="1060" id="namedview976" showgrid="false" - inkscape:zoom="1.6922351" - inkscape:cx="-130.52172" - inkscape:cy="183.98903" + inkscape:zoom="2.3931818" + inkscape:cx="8.4123423" + inkscape:cy="122.97195" inkscape:window-x="0" inkscape:window-y="20" inkscape:window-maximized="0" inkscape:current-layer="svg974" - showguides="false" - inkscape:snap-nodes="false" /> + showguides="false" /> + + + + @@ -122,31 +133,153 @@ stop-opacity="0" id="stop3287" /> + + + + + + transform="matrix(0.95,0,0,0.95,1.1939867,1.6421008)" + id="g14577"> - - + y="4.245285" + x="23.113207" + height="40.212261" + width="3.7735846" + id="rect14571" + style="opacity:1;fill:#1f1a17;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.69328892;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal" /> + + + + + + + + + + + + + id="path3879" + d="m 17.809955,22.804124 c -0.364,-0.186 -0.542,-0.279 -0.542,-0.279 -0.499,-0.195 -0.652,-0.559 -0.474,-1.092 0.195,-0.491 0.576,-0.66 1.143,-0.491 1.947,0.711 3.294,2.02 4.04,3.92 0.118,0.542 -0.076,0.914 -0.592999,1.118 -0.516001,0.161 -0.864001,-0.017 -1.041001,-0.55 -0.136,-0.279 -0.229,-0.466 -0.296,-0.542 -0.186,0.144 -0.423,0.245 -0.72,0.296 -1.01,0.161 -1.6,-0.279 -1.761,-1.338 -0.051,-0.364 0.034,-0.711 0.246,-1.041" + style="fill:#000000;stroke-width:1" /> + + + diff --git a/client/src/variants/Cwda.js b/client/src/variants/Cwda.js index c0d36edd..9142d468 100644 --- a/client/src/variants/Cwda.js +++ b/client/src/variants/Cwda.js @@ -514,6 +514,20 @@ export class CwdaRules extends ChessRules { ); } + // [HACK] So that the function above works also on Fide army: + isAttackedByF_rook(sq, color) { + return super.isAttackedByRook(sq, color); + } + isAttackedByF_knight(sq, color) { + return super.isAttackedByKnight(sq, color); + } + isAttackedByF_bishop(sq, color) { + return super.isAttackedByBishop(sq, color); + } + isAttackedByF_queen(sq, color) { + return super.isAttackedByQueen(sq, color); + } + static get VALUES() { return Object.assign( {