├── .browserslistrc ├── src ├── bus.js ├── main.js ├── editor.vue ├── newboard.vue └── App.vue ├── docs ├── favicon.png ├── index.html ├── js │ ├── app.89c1025a.js │ ├── app.89c1025a.js.map │ └── chunk-vendors.81e07bfc.js └── css │ └── chunk-vendors.23408e99.css ├── public ├── favicon.png └── index.html ├── babel.config.js ├── vue.config.js ├── index.html ├── .gitignore ├── package.json └── README.md /.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | -------------------------------------------------------------------------------- /src/bus.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | export default new Vue() 3 | -------------------------------------------------------------------------------- /docs/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitogit/vue-chessboard-examples/HEAD/docs/favicon.png -------------------------------------------------------------------------------- /public/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitogit/vue-chessboard-examples/HEAD/public/favicon.png -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /vue.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | publicPath: process.env.NODE_ENV === 'production' 3 | ? '/vue-chessboard-examples/' 4 | : '/' 5 | } 6 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | 4 | /* eslint-disable no-new */ 5 | window.vm = new Vue({ 6 | el: '#app', 7 | render: h => h(App) 8 | }) 9 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |You can extend the chessboard component to add new methods. Play against random moves and undo the moves
36 | 37 |You can extend the chessboard component to use all chessgrounds configurations
42 |You can extend the chessboard component to add new methods
66 |Also you can undo a move using Vue events
67 | 68 | ```html 69 | // newboard.vue 70 | 71 | 124 | ``` 125 | ```html 126 | // bus.js 127 | import Vue from 'vue' 128 | export default new Vue() 129 | ``` 130 | ```html 131 | //App.vue - emit the events 132 | 133 | 134 | .... 135 | methods: { 136 | undo() { 137 | bus.$emit('undo') 138 | } 139 | } 140 | ``` 141 | 142 | #### Extended Component (Simple board editor). 143 |Move any piece to anywhere. You can extend the chessboard component to use all chessgrounds configurations
144 | 145 | ```html 146 | // editor.vue 147 | 164 | ``` 165 | 166 | #### Full application 167 | Here is a full application using the component: [Chess Guardian](http://vitomd.com/vue-chess-guardian/) 168 | 169 | ## Build Setup 170 | 171 | ``` bash 172 | # install dependencies 173 | yarn install 174 | 175 | # serve with hot reload at localhost:8081 176 | yarn serve 177 | 178 | # build for production with minification 179 | npm build 180 | ``` 181 | -------------------------------------------------------------------------------- /docs/js/app.89c1025a.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/newboard.vue","webpack:///./src/editor.vue","webpack:///./src/App.vue?6023","webpack:///./src/bus.js","webpack:///src/newboard.vue","webpack:///./src/newboard.vue?0a8e","webpack:///src/editor.vue","webpack:///./src/editor.vue?6f88","webpack:///src/App.vue","webpack:///./src/App.vue?a7d1","webpack:///./src/App.vue","webpack:///./src/main.js"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","_vm","this","_h","$createElement","_c","_self","attrs","_v","currentFen","_l","fen","staticClass","on","$event","loadFen","_s","showInfo","positionInfo","promote","undo","_m","staticRenderFns","Vue","extends","methods","game","board","set","userPlay","aiNextMove","move","randomMove","turnColor","toColor","movable","color","dests","possibleMoves","events","mounted","created","bus","$on","component","free","components","chessboard","newboard","editor","confirm","$emit","fens","vm","el","render","h","App"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAG/Be,GAAqBA,EAAoBhB,GAE5C,MAAMO,EAASC,OACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD,EAAiBb,GAAkB,IAGvDe,IAER,SAASA,IAER,IADA,IAAIC,EACIf,EAAI,EAAGA,EAAIY,EAAgBV,OAAQF,IAAK,CAG/C,IAFA,IAAIgB,EAAiBJ,EAAgBZ,GACjCiB,GAAY,EACRC,EAAI,EAAGA,EAAIF,EAAed,OAAQgB,IAAK,CAC9C,IAAIC,EAAQH,EAAeE,GACG,IAA3BX,EAAgBY,KAAcF,GAAY,GAE3CA,IACFL,EAAgBQ,OAAOpB,IAAK,GAC5Be,EAASM,EAAoBA,EAAoBC,EAAIN,EAAe,KAItE,OAAOD,EAIR,IAAIQ,EAAmB,GAKnBhB,EAAkB,CACrB,IAAO,GAGJK,EAAkB,GAGtB,SAASS,EAAoB1B,GAG5B,GAAG4B,EAAiB5B,GACnB,OAAO4B,EAAiB5B,GAAU6B,QAGnC,IAAIC,EAASF,EAAiB5B,GAAY,CACzCK,EAAGL,EACH+B,GAAG,EACHF,QAAS,IAUV,OANAf,EAAQd,GAAUW,KAAKmB,EAAOD,QAASC,EAAQA,EAAOD,QAASH,GAG/DI,EAAOC,GAAI,E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F,WA0CA,WACIC,EAAIC,IAAI,QAAQ,WACd,EAAN,YCjDmU,I,YLO/TC,EAAY,eACd,EACA,EACA,GACA,EACA,KACA,KACA,MAIa,EAAAA,E,QMdf,GACEpE,KAAM,SACNgD,QAAS,EAAX,cACEgB,QAHF,WAIItC,KAAKyB,MAAMC,IAAI,CACbO,QAAS,CACPC,MAAO,OACPS,MAAM,EACNN,OAAQ,CAAhB,mBCZiU,INO7T,EAAY,eACd,EACA,EACA,GACA,EACA,KACA,KACA,MAIa,I,QOmCf,GACE/D,KAAM,MACNsE,WAAY,CACVC,WAAJ,gBACIC,SAAJ,EACIC,OAAJ,GAEE7G,KAPF,WAQI,MAAO,CACLqE,WAAY,GACZS,aAAc,OAGlBO,QAAS,CACPR,SADJ,SACA,GACMf,KAAKgB,aAAe9E,GAEtB2E,QAJJ,SAIA,GACMb,KAAKO,WAAaE,GAEpBQ,QAPJ,WAQM,OAAI+B,QAAQ,6CACH,IAEA,KAGX9B,KAdJ,WAeMsB,EAAIS,MAAM,UAGdV,QA/BF,WAgCIvC,KAAKkD,KAAO,CAAC,mEACjB,yDCtF8T,ICO1T,EAAY,eACd,EACA,EACA9B,GACA,EACA,KACA,KACA,MAIa,I,QCdfxB,OAAOuD,GAAK,IAAI9B,OAAI,CAClB+B,GAAI,OACJC,OAAQ,SAAAC,GAAC,OAAIA,EAAEC","file":"js/app.89c1025a.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"app\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/vue-chessboard-examples/\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([0,\"chunk-vendors\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","var render, staticRenderFns\nimport script from \"./newboard.vue?vue&type=script&lang=js&\"\nexport * from \"./newboard.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render, staticRenderFns\nimport script from \"./editor.vue?vue&type=script&lang=js&\"\nexport * from \"./editor.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"app\"}},[_c('h1',[_vm._v(\"Simple Chessboard with legal moves\")]),_c('chessboard'),_c('h1',[_vm._v(\"Simple Chessboard with free moves\")]),_c('chessboard',{attrs:{\"free\":true}}),_c('h1',[_vm._v(\"Simple Chessboard that shows threats for current position and player\")]),_c('chessboard',{attrs:{\"showThreats\":true}}),_c('h1',[_vm._v(\"Fen binded to the chessboard (load position when click on a new position)\")]),_c('chessboard',{attrs:{\"fen\":_vm.currentFen}}),_vm._l((_vm.fens),function(fen){return _c('button',{key:fen + '-binded',staticClass:\"button is-light\",on:{\"click\":function($event){return _vm.loadFen(fen)}}},[_vm._v(\" \"+_vm._s(fen)+\" \")])}),_c('h1',[_vm._v(\"Chessboard with binded onmove method. Shows threats on text area\")]),_c('chessboard',{on:{\"onMove\":_vm.showInfo}}),_c('div',[_vm._v(\" \"+_vm._s(this.positionInfo)+\" \")]),_c('h1',[_vm._v(\"Chessboard with onpromote callback. \")]),_vm._v(\" It will show you a simple confirmation box asking if you want to promote to queen or rook. You can use a fancy piece selector instead of this simple confirmation box. \"),_c('chessboard',{attrs:{\"onPromotion\":_vm.promote}}),_c('h1',[_vm._v(\"Multiple Chessboards with different fens. \")]),_vm._l((_vm.fens),function(fen){return _c('div',{key:fen},[_c('chessboard',{attrs:{\"fen\":fen}})],1)}),_c('h1',[_vm._v(\"Extended Component (Play vs random AI with undos). \")]),_c('p',[_vm._v(\" You can extend the chessboard component to add new methods. Play against random moves and undo the moves\")]),_c('newboard'),_c('button',{staticClass:\"button is-light\",on:{\"click\":function($event){return _vm.undo()}}},[_vm._v(\"UNDO\")]),_c('h1',[_vm._v(\"Fully free piece movement. \")]),_vm._m(0),_c('editor')],2)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('p',[_vm._v(\" You can extend the chessboard component to use all \"),_c('a',{attrs:{\"href\":\"https://github.com/ornicar/chessground/blob/master/src/config.ts\"}},[_vm._v(\"chessgrounds configurations\")])])}]\n\nexport { render, staticRenderFns }","import Vue from 'vue'\nexport default new Vue()\n","\n\n","import mod from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./newboard.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./newboard.vue?vue&type=script&lang=js&\"","\n\n","import mod from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./editor.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./editor.vue?vue&type=script&lang=js&\"","\nYou can extend the chessboard component to add new methods. Play against random moves and undo the moves
\n\nYou can extend the chessboard component to use all chessgrounds configurations
\n