X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FBoard.vue;h=8392cfe474f21260153b28124fd491bd442a1df2;hb=4d64881e3b2dc55fe260a53195f9f3bc2e959fdf;hp=32738829f6763eb0692c50e9ac1cc953012c09e7;hpb=e27329232b83700d63c8fb52af6f4c2eec9a569c;p=vchess.git diff --git a/client/src/components/Board.vue b/client/src/components/Board.vue index 32738829..8392cfe4 100644 --- a/client/src/components/Board.vue +++ b/client/src/components/Board.vue @@ -2,6 +2,8 @@ // This can work for squared boards (2 or 4 players), with some adaptations (TODO) // TODO: for 3 players, write a "board3.js" +// TODO: current clicked square + moving square as parameters, + highlight + import { getSquareId, getSquareFromId } from "@/utils/squareId"; import { ArrayFun } from "@/utils/array"; @@ -111,7 +113,7 @@ export default { && this.selectedPiece.parentNode.id == "sq-"+ci+"-"+cj, }, attrs: { - src: "@/assets/images/pieces/" + + src: "/images/pieces/" + V.getPpath(this.vr.board[ci][cj]) + ".svg", }, } @@ -239,11 +241,11 @@ export default { 'div', { 'class': { - "col-sm-12":true, - "col-md-10":true, - "col-md-offset-1":true, - "col-lg-8":true, - "col-lg-offset-2":true, + "col-sm-12": true, + "col-md-10": true, + "col-md-offset-1": true, + "col-lg-8": true, + "col-lg-offset-2": true, }, // NOTE: click = mousedown + mouseup on: { @@ -362,3 +364,104 @@ export default { }, }; + +