mirror of
https://github.com/danbee/chess
synced 2025-03-04 08:39:06 +00:00
WIP: Select a square
This commit is contained in:
parent
2ef5c69fd3
commit
2ef25f045e
@ -6,8 +6,9 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ChessBoard from './chess-board';
|
import ChessBoard from './chess-board';
|
||||||
|
import ChessPiece from "./chess-piece";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { ChessBoard }
|
components: { ChessBoard, ChessPiece }
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -17,5 +17,10 @@ export default {
|
|||||||
return this.$store.state.board;
|
return this.$store.state.board;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
selectSquare: () => {
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="board-square" :class="classes(piece)">
|
<div class="board-square" :class="classes(piece)"
|
||||||
|
v-on:click="selectSquare">
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -11,6 +12,9 @@ export default {
|
|||||||
return [piece.type, piece.colour];
|
return [piece.type, piece.colour];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
selectSquare: () => {
|
||||||
|
console.log("Clicked square");
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
props: ["piece"]
|
props: ["piece"]
|
||||||
|
|||||||
@ -7,7 +7,6 @@
|
|||||||
"babel-plugin-transform-runtime": "^6.15.0",
|
"babel-plugin-transform-runtime": "^6.15.0",
|
||||||
"brunch": "^2.9.1",
|
"brunch": "^2.9.1",
|
||||||
"javascript-brunch": "^2.0.0",
|
"javascript-brunch": "^2.0.0",
|
||||||
"jquery": "^3.1.1",
|
|
||||||
"sass-brunch": "^2.7.0",
|
"sass-brunch": "^2.7.0",
|
||||||
"vue": "^2.0.5",
|
"vue": "^2.0.5",
|
||||||
"vue-brunch": "^1.2.3",
|
"vue-brunch": "^1.2.3",
|
||||||
|
|||||||
@ -1941,10 +1941,6 @@ jodid25519@^1.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
jsbn "~0.1.0"
|
jsbn "~0.1.0"
|
||||||
|
|
||||||
jquery:
|
|
||||||
version "3.1.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.1.1.tgz#347c1c21c7e004115e0a4da32cece041fad3c8a3"
|
|
||||||
|
|
||||||
js-base64@^2.1.9:
|
js-base64@^2.1.9:
|
||||||
version "2.1.9"
|
version "2.1.9"
|
||||||
resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce"
|
resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user