https://www.onlinewebfonts.com/icon/154680
https://www.flaticon.com/free-icon/bleach_481058?term=triangle&page=1&position=2
https://www.onlinewebfonts.com/icon/89755
+https://www.iconfinder.com/icons/107153/circle_facebook_icon
+https://www.iconfinder.com/icons/104461/twitter_icon
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ height="67px"
+ id="Layer_1"
+ style="enable-background:new 0 0 67 67;"
+ version="1.1"
+ viewBox="0 0 67 67"
+ width="67px"
+ xml:space="preserve"
+ sodipodi:docname="facebook.svg"
+ inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"><metadata
+ id="metadata9"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
+ id="defs7" /><sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1060"
+ id="namedview5"
+ showgrid="false"
+ inkscape:zoom="4.981409"
+ inkscape:cx="34.067797"
+ inkscape:cy="33.5"
+ inkscape:window-x="0"
+ inkscape:window-y="20"
+ inkscape:window-maximized="0"
+ inkscape:current-layer="Layer_1" /><path
+ d="m 28.909296,51.384204 h 7.4184 v -17.9542 h 4.9489 l 0.6556,-6.1864 h -5.6045 l 0.0077,-3.0976 c 0,-1.6126 0.154,-2.4783 2.4684,-2.4783 h 3.0932 v -6.1875 h -4.95 c -5.9455,0 -8.0377,3.0019 -8.0377,8.0487 v 3.7147 h -3.7059 v 6.1875 h 3.7059 z m 4.6585,15.048 c -18.2248,0 -32.99999938,-14.7752 -32.99999938,-33 0,-18.2259 14.77519938,-33.00000062 32.99999938,-33.00000062 18.2248,0 33,14.77410062 33,33.00000062 0,18.2248 -14.7752,33 -33,33 z"
+ style="clip-rule:evenodd;fill:#010101;fill-rule:evenodd;stroke-width:1.10000002"
+ id="path2"
+ inkscape:connector-curvature="0" /></svg>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ enable-background="new 0 0 56.693 56.693"
+ height="56.693px"
+ id="Layer_1"
+ version="1.1"
+ viewBox="0 0 56.693 56.693"
+ width="56.693px"
+ xml:space="preserve"
+ sodipodi:docname="twitter.svg"
+ inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"><metadata
+ id="metadata9"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
+ id="defs7" /><sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1060"
+ id="namedview5"
+ showgrid="false"
+ inkscape:zoom="8.3255427"
+ inkscape:cx="28.82695"
+ inkscape:cy="28.3465"
+ inkscape:window-x="0"
+ inkscape:window-y="20"
+ inkscape:window-maximized="0"
+ inkscape:current-layer="Layer_1" /><path
+ d="m 28.468253,0.38840479 c -15.504,0 -28.07250072,12.57078021 -28.07250072,28.07250021 0,15.504 12.56850072,28.07022 28.07250072,28.07022 15.504,0 28.07022,-12.56622 28.07022,-28.07022 0,-15.50172 -12.56736,-28.07250021 -28.07022,-28.07250021 z M 42.608813,22.800805 c 0.01482,0.30324 0.02052,0.60762 0.02052,0.91542 0,9.34914 -7.11588,20.12784 -20.12784,20.12784 -3.99456,0 -7.71438,-1.17078 -10.84482,-3.17718 0.55404,0.06498 1.11606,0.09804 1.6872,0.09804 3.31512,0 6.36576,-1.13088 8.78598,-3.02784 -3.0951,-0.05814 -5.70684,-2.10444 -6.60744,-4.91454 0.43092,0.08436 0.87438,0.12654 1.33038,0.12654 0.64524,0 1.26996,-0.08436 1.8639,-0.24738 -3.2376,-0.6498 -5.67606,-3.5112 -5.67606,-6.93576 0,-0.03078 0,-0.06042 0.0011,-0.0912 0.95304,0.5301 2.04402,0.84816 3.20454,0.88578 -1.89924,-1.2711 -3.14754,-3.43368 -3.14754,-5.88924 0,-1.29618 0.34884,-2.51256 0.9576,-3.5568 3.48954,4.27956 8.70276,7.0965 14.58288,7.39062 -0.12084,-0.51642 -0.18354,-1.05792 -0.18354,-1.61196 0,-3.90564 3.16692,-7.0737 7.07484,-7.0737 2.0349,0 3.87258,0.85956 5.16306,2.23326 1.61196,-0.31578 3.12588,-0.9063 4.49274,-1.71684 -0.5301,1.653 -1.65072,3.03924 -3.1122,3.91362 1.43298,-0.171 2.79642,-0.55176 4.0641,-1.11378 -0.9462,1.42158 -2.14662,2.6676 -3.52944,3.6651 z"
+ id="path2"
+ inkscape:connector-curvature="0"
+ style="stroke-width:1.13999999" /></svg>
\ No newline at end of file
router-link.menuitem(to="/about") {{ st.tr["About"] }}
router-link.menuitem(to="/faq") F.A.Q.
a.menuitem(href="https://discord.gg/a9ZFKBe")
- span Discord
- img(src="/images/icons/discord.svg")
+ img.first(src="/images/icons/discord.svg")
a.menuitem(href="https://github.com/yagu0/vchess")
- span {{ st.tr["Code"] }}
img(src="/images/icons/github.svg")
+ a.menuitem(href="https://www.facebook.com/Variants-Chess-Club-112565840437886")
+ img(src="/images/icons/facebook.svg")
+ a.menuitem(href="https://twitter.com/VchessC")
+ img.last(src="/images/icons/twitter.svg")
p.clickable(onClick="window.doClick('modalContact')")
| {{ st.tr["Contact"] }}
</template>
color: #2c3e50
text-decoration: none
& > img
- height: 1.2em
+ height: 1.5em
display: inline-block
- margin-left: 5px
+ margin: 0
+ &.first
+ margin-left: 5px
+ &.last
+ margin-right: 5px
& > p
display: inline-block
margin: 0 12px
if (
// NOTE: "castling" arg is used by some variants (Monster),
// where "isAttacked" is overloaded in an infinite-recursive way.
+ // TODO: not used anymore (Monster + Doublemove2 are simplified).
(!castleInCheck && this.isAttacked([x, i], oppCol, "castling")) ||
(this.board[x][i] != V.EMPTY &&
// NOTE: next check is enough, because of chessboard constraints
"Challenge declined": "Challenge declined",
"Chat here": "Chat here",
"Clear history": "Clear history",
- Code: "Code",
"Connection token sent. Check your emails!": "Connection token sent. Check your emails!",
Contact: "Contact",
"Correspondance challenges": "Correspondance challenges",
"Challenge declined": "Desafío rechazado",
"Chat here": "Chat aquí",
"Clear history": "Clara historia",
- Code: "Código",
"Connection token sent. Check your emails!": "Token de conexión enviado. ¡Revisa tus correos!",
Contact: "Contacto",
"Correspondance challenges": "Desafíos por correspondencia",
"Challenge declined": "Défi refusé",
"Chat here": "Chattez ici",
"Clear history": "Effacer l'historique",
- Code: "Code",
"Connection token sent. Check your emails!": "Token de connection envoyé. Allez voir vos emails !",
Contact: "Contact",
"Correspondance challenges": "Défis par correspondance",
--- /dev/null
+p.boxed TODO
--- /dev/null
+p.boxed TODO
--- /dev/null
+p.boxed TODO
return moves;
}
- isAttacked(sq, color) {
+ isAttacked() {
// Goal is king capture => no checks
return false;
}
--- /dev/null
+import { ChessRules } from "@/base_rules";
+import { SuicideRules } from "@/variants/Suicide";
+
+export class KingletRules extends ChessRules {
+ static get HasFlags() {
+ return false;
+ }
+
+ static get PawnSpecs() {
+ return Object.assign(
+ {},
+ ChessRules.PawnSpecs,
+ { promotions: [V.KING] }
+ );
+ }
+
+ static IsGoodPosition(position) {
+ if (position.length == 0) return false;
+ const rows = position.split("/");
+ if (rows.length != V.size.x) return false;
+ // Just check that at least one pawn of each color is there:
+ let pawns = { "w": 0, "b": 0 };
+ for (let row of rows) {
+ let sumElts = 0;
+ for (let i = 0; i < row.length; i++) {
+ const lowerRi = row[i].toLowerCase();
+ if (V.PIECES.includes(lowerRi)) {
+ if (lowerRi == 'p') pawns[row[i] == lowerRi ? "b" : "w"]++;
+ sumElts++;
+ } else {
+ const num = parseInt(row[i]);
+ if (isNaN(num)) return false;
+ sumElts += num;
+ }
+ }
+ if (sumElts != V.size.y) return false;
+ }
+ if (Object.values(pawns).some(v => v == 0)) return false;
+ return true;
+ }
+
+ scanKings() {}
+
+ filterValid(moves) {
+ return moves;
+ }
+
+ getCheckSquares() {
+ return [];
+ }
+
+ // No variables update because no royal king + no castling
+ prePlay() {}
+ postPlay() {}
+ preUndo() {}
+ postUndo() {}
+
+ getCurrentScore() {
+ const pawnRemain = {
+ 'w': this.board.some(b =>
+ b.some(cell => cell[0] == 'w' && cell[1] == 'p')),
+ 'b': this.board.some(b =>
+ b.some(cell => cell[0] == 'b' && cell[1] == 'p'))
+ }
+ if (!pawnRemain['w']) return "0-1";
+ if (!pawnRemain['b']) return "1-0";
+ if (this.atLeastOneMove()) return "*";
+ // Stalemate: draw
+ return "1/2";
+ }
+
+ static GenRandInitFen(randomness) {
+ return SuicideRules.GenRandInitFen(randomness);
+ }
+
+ static get VALUES() {
+ // TODO: no clue what correct values would be
+ return {
+ p: 5,
+ r: 4,
+ n: 3,
+ b: 3,
+ q: 7,
+ k: 4
+ };
+ }
+};
);
}
- isAttacked(sq, color, castling) {
+ isAttacked() {
// Goal is king capture => no checks
return false;
}