From: Benjamin Auder Date: Tue, 21 Apr 2020 13:10:35 +0000 (+0200) Subject: Adjustments + add en-passant to Zen rules X-Git-Url: https://git.auder.net/js/doc/assets/rpsls.css?a=commitdiff_plain;h=ffeaef854d80445ef87f2cdf4fe71d60347a81bf;p=vchess.git Adjustments + add en-passant to Zen rules --- diff --git a/TODO b/TODO index 9c3992c7..0e5d0fd2 100644 --- a/TODO +++ b/TODO @@ -25,8 +25,11 @@ https://www.chessvariants.com/mvopponent.dir/mesmer-chess.html ===== +fanorona https://fr.wikipedia.org/wiki/Fanorona +Yoté https://fr.wikipedia.org/wiki/Yot%C3%A9 http://www.zillionsofgames.com/cgi-bin/zilligames/submissions.cgi/92187?do=show;id=960 gess https://en.wikipedia.org/wiki/Gess weiqi (check if landed stone captures, walk on connected components), go13, go9, gomoku, reversi + first click show the stone, second click confirm the move? avalam, qoridor, xiangqi, draughts, draughts8 (puis quand hexaboards peut-être: hexavariants + Hex) Byo-yomi possible: 1h+b15,5m (15 pierres 5 minutes) diff --git a/client/src/components/Board.vue b/client/src/components/Board.vue index 41398625..7f2e43e4 100644 --- a/client/src/components/Board.vue +++ b/client/src/components/Board.vue @@ -121,27 +121,28 @@ export default { const squareId = "sq-" + ci + "-" + cj; let elems = []; if (showPiece(ci, cj)) { - elems.push( - h("img", { - "class": { - piece: true, - ghost: - !!this.selectedPiece && - this.selectedPiece.parentNode.id == squareId - }, - attrs: { - src: - "/images/pieces/" + - this.vr.getPpath( - this.vr.board[ci][cj], - // Extra args useful for some variants: - this.userColor, - this.score, - this.orientation) + - V.IMAGE_EXTENSION - } - }) - ); + let pieceSpecs = { + "class": { + piece: true, + ghost: + !!this.selectedPiece && + this.selectedPiece.parentNode.id == squareId + }, + attrs: { + src: + "/images/pieces/" + + this.vr.getPpath( + this.vr.board[ci][cj], + // Extra args useful for some variants: + this.userColor, + this.score, + this.orientation) + + V.IMAGE_EXTENSION + } + }; + if (this.arrows.length == 0) + pieceSpecs["style"] = { position: "absolute" }; + elems.push(h("img", pieceSpecs)); } if (this.settings.hints && hintSquares[ci][cj]) { elems.push( @@ -174,12 +175,16 @@ export default { "class": { board: true, ["board" + sizeY]: true, - "light-square": lightSquare && !V.Monochrome, - "dark-square": !lightSquare || !!V.Monochrome, + "light-square": + !V.Notoodark && lightSquare && !V.Monochrome, + "dark-square": + !V.Notoodark && (!lightSquare || !!V.Monochrome), + "middle-square": V.Notoodark, [this.settings.bcolor]: true, "in-shadow": inShadow(ci, cj), "highlight-light": inHighlight(ci, cj) && lightSquare, - "highlight-dark": inHighlight(ci, cj) && !lightSquare, + "highlight-dark": + inHighlight(ci, cj) && (V.Monochrome || !lightSquare), "incheck-light": showCheck && lightSquare && incheckSq[ci][cj], "incheck-dark": @@ -213,6 +218,7 @@ export default { }, [ h("img", { + // NOTE: class "reserve" not used currently "class": { piece: true, reserve: true }, attrs: { src: @@ -221,7 +227,14 @@ export default { ".svg" } }), - h("sup", { "class": { "reserve-count": true } }, [ qty ]) + h( + "sup", + { + "class": { "reserve-count": true }, + style: { top: "calc(100% + 5px)" } + }, + [ qty ] + ) ] ) ); @@ -248,7 +261,14 @@ export default { ".svg" } }), - h("sup", { "class": { "reserve-count": true } }, [ qty ]) + h( + "sup", + { + "class": { "reserve-count": true }, + style: { top: "calc(100% + 5px)" } + }, + [ qty ] + ) ] ) ); @@ -831,11 +851,15 @@ export default {