From fc781d3b0027b38b0dbea4c8addc5a75f4630668 Mon Sep 17 00:00:00 2001
From: bill-the-dev
Date: Sun, 13 Feb 2022 13:30:16 -0500
Subject: [PATCH] add win conditions to board, found bug in board piece
movement
---
dist/main.css | 17 ++++-------------
dist/main.js | 6 +++---
index.html | 2 +-
notes_bugs.md | 8 +++++++-
src/scripts/board.js | 36 +++++++++++++++++++++---------------
src/scripts/game.js | 1 -
src/scripts/modal.js | 19 ++++++++++---------
src/styles/index.css | 22 +++++-----------------
8 files changed, 51 insertions(+), 60 deletions(-)
diff --git a/dist/main.css b/dist/main.css
index daedcff..874d817 100644
--- a/dist/main.css
+++ b/dist/main.css
@@ -7,15 +7,6 @@
}
body {
- /* background: rgb(236,190,70);
- background: radial-gradient(circle, rgba(170, 168, 161, 0.942) 6%, rgb(241, 236, 225) 90%); */
- /* background-color: #EEEE; */
- /* background-color: #b8c6db;
- background-image: linear-gradient(315deg, #b8c6db 0%, #f5f7fa 74%); */
- /* background-color: #ffffff;
- background-image: linear-gradient(315deg, #ffffff 0%, #d7e1ec 74%); */
- /* background-color: #2f4353;
- background-image: linear-gradient(315deg, #2f4353 0%, #d2ccc4 74%); */
background-color: #aee1f9;
background-image: linear-gradient(315deg, #aee1f9 0%, #f6ebe6 74%);
margin: 1px;
@@ -60,8 +51,8 @@ header {
#board {
display: grid;
grid-template-columns: repeat(5, 1fr);
- /* five equal 'fractioned' tracks */
- box-sizing: border-box;
+ /* equal 'fractioned' tracks */
+ box-sizing: content-box;
/*within container */
padding: 0px;
/* border: 2px solid black; */
@@ -145,7 +136,7 @@ header {
.modal__howTo {
height: 100%;
- width: 100%;
+ max-width: 100%;
display: flex;
position: fixed;
background-color: rgba(0, 0, 0, 0.25);
@@ -169,7 +160,7 @@ header {
font-size: 1rem;
color: #302f2f;
z-index: 4;
- overflow-y: scroll;
+ overflow: auto;
}
.modal__fill-active {
diff --git a/dist/main.js b/dist/main.js
index 7180c1b..04587ed 100644
--- a/dist/main.js
+++ b/dist/main.js
@@ -27,7 +27,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ Board; }\n/* harmony export */ });\n/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _piece__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./piece */ \"./src/scripts/piece.js\");\n\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\n // import { Player } from \"./player\";\n\nvar Board = /*#__PURE__*/function () {\n function Board() {\n _classCallCheck(this, Board);\n\n // this.player = currentPlayer;\n this.grid = [];\n\n for (var i = 0; i < 5; i++) {\n var row = [];\n\n for (var j = 0; j < 5; j++) {\n var col = null;\n row.push(col);\n }\n\n this.grid.push(row);\n }\n\n window.Piece = _piece__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; // add to window\n } // out of bounds only\n\n\n _createClass(Board, [{\n key: \"validPos\",\n value: function validPos(pos) {\n if (pos[0] < 0 || pos[0] > 4) return false;\n if (pos[1] < 0 || pos[1] > 4) return false;\n return true;\n } // returns true or color\n\n }, {\n key: \"isEmpty\",\n value: function isEmpty(pos) {\n var that = this;\n var gridPos = that.grid[pos[0]][pos[1]];\n\n if (gridPos === null) {\n return true;\n } else {\n return that.getPiece(pos).color;\n }\n }\n }, {\n key: \"getPiece\",\n value: function getPiece(pos) {\n return this.grid[pos[0]][pos[1]];\n }\n }, {\n key: \"viewPlacePiece\",\n value: function viewPlacePiece(pos, piece) {\n var that = this;\n var posStr = JSON.stringify(pos);\n var square = document.getElementById(posStr);\n var setPiece = document.createElement('div');\n setPiece.className = \"\".concat(piece.color, \"-\").concat(piece.type, \"-piece inactive-pawn\");\n setPiece.id = \"pawn\";\n square.appendChild(setPiece);\n that.grid[pos[0]][pos[1]] = piece; // redundant?\n } // after move gets rid of piece view\n\n }, {\n key: \"viewRemovePiece\",\n value: function viewRemovePiece(pos) {\n var that = this; // debugger;\n\n var posStr = JSON.stringify(pos);\n var square = document.getElementById(posStr);\n var child = square.firstChild; // setTimeout(() => square.child.style = 'opacity = 0.5' , 500);\n // setTimeout(() => square.child.style = 'opacity = 0.3' , 1000);\n // setTimeout(() => square.child.style = 'opacity = 0.2' , 2000);\n\n setTimeout(function () {\n return square.removeChild(child);\n }, 3000);\n }\n }, {\n key: \"placePiece\",\n value: function placePiece(pos, piece) {\n var that = this;\n\n if (that.isEmpty(pos)) {\n that.viewPlacePiece(pos, piece);\n piece.position = pos;\n return that.grid[pos[0]][pos[1]] = piece;\n } else {\n throw new Error('That position is not valid');\n }\n }\n }, {\n key: \"removePiece\",\n value: function removePiece(pos) {\n return this.grid[pos[0]][pos[1]] = null;\n }\n }, {\n key: \"movePiece\",\n value: function movePiece(posStart, posEnd) {\n // posStart = clicked piece\n // posEnd = clicked space (highlighted)\n // if current player color = selected piece color\n // if selected end position = valid (highlighted)\n // if move options include (highlighted)\n var pawn = this.getPiece(posStart);\n this.removePiece(posStart);\n return this.placePiece(posEnd, pawn);\n }\n }, {\n key: \"setBoard\",\n value: function setBoard() {\n var pawnB1 = new _piece__WEBPACK_IMPORTED_MODULE_1__[\"default\"]('student', 'blue');\n var pawnB2 = new _piece__WEBPACK_IMPORTED_MODULE_1__[\"default\"]('student', 'blue');\n var pawnB3 = new _piece__WEBPACK_IMPORTED_MODULE_1__[\"default\"]('master', 'blue');\n var pawnB4 = new _piece__WEBPACK_IMPORTED_MODULE_1__[\"default\"]('student', 'blue');\n var pawnB5 = new _piece__WEBPACK_IMPORTED_MODULE_1__[\"default\"]('student', 'blue');\n this.placePiece([0, 0], pawnB1);\n this.placePiece([0, 1], pawnB2);\n this.placePiece([0, 2], pawnB3);\n this.placePiece([0, 3], pawnB4);\n this.placePiece([0, 4], pawnB5);\n var pawnR1 = new _piece__WEBPACK_IMPORTED_MODULE_1__[\"default\"]('student', 'red');\n var pawnR2 = new _piece__WEBPACK_IMPORTED_MODULE_1__[\"default\"]('student', 'red');\n var pawnR3 = new _piece__WEBPACK_IMPORTED_MODULE_1__[\"default\"]('master', 'red');\n var pawnR4 = new _piece__WEBPACK_IMPORTED_MODULE_1__[\"default\"]('student', 'red');\n var pawnR5 = new _piece__WEBPACK_IMPORTED_MODULE_1__[\"default\"]('student', 'red');\n this.placePiece([4, 0], pawnR1);\n this.placePiece([4, 1], pawnR2);\n this.placePiece([4, 2], pawnR3);\n this.placePiece([4, 3], pawnR4);\n this.placePiece([4, 4], pawnR5);\n }\n }, {\n key: \"sayHi\",\n value: function sayHi() {\n console.log('hiiiiii');\n }\n }]);\n\n return Board;\n}(); // export default Board; \n//confirmed by printing below with fill: let col = [`[${i},${j}]`];\n// let board1 = new Board();\n// // assignment works!\n// board1.grid[1][1] = 'hello' // assign\n// console.log(board1.grid);\n// console.log(board1.grid[0][0]);\n// //validPos() works!\n// if (board1.validPos([1, 1])) {\n// console.log('valid!'); //valid\n// } else {\n// console.log('invalid!');\n// }\n// // getPiece() works!\n// console.log(board1.getPiece([1, 1]));\n// // isEmpty() works!\n// console.log(board1.isEmpty([1, 1]));\n// Board should appear: \n// TOP OPPONENT\n// [4, 0] [4, 1] [4, 2] [4, 3] [4, 4] \n// [3, 0] [3, 1] [3, 2] [3, 3] [3, 4] \n// [2, 0] [2, 1] [2, 2] [2, 3] [2, 4] \n// [1, 0] [1, 1] [1, 2] [1, 3] [1, 4] \n// [0, 0] [0, 1] [0, 2] [0, 3] [0, 4] \n// BOTTOM PLAYER\n\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvc2NyaXB0cy9ib2FyZC5qcy5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Q0FDQTs7SUFFcUJDO0FBQ25CLG1CQUFjO0FBQUE7O0FBQ1o7QUFDQSxTQUFLQyxJQUFMLEdBQVksRUFBWjs7QUFDQSxTQUFLLElBQUlDLENBQUMsR0FBRyxDQUFiLEVBQWdCQSxDQUFDLEdBQUcsQ0FBcEIsRUFBdUJBLENBQUMsRUFBeEIsRUFBNEI7QUFDMUIsVUFBSUMsR0FBRyxHQUFHLEVBQVY7O0FBQ0EsV0FBSyxJQUFJQyxDQUFDLEdBQUcsQ0FBYixFQUFnQkEsQ0FBQyxHQUFHLENBQXBCLEVBQXVCQSxDQUFDLEVBQXhCLEVBQTRCO0FBQzFCLFlBQUlDLEdBQUcsR0FBRyxJQUFWO0FBRUFGLFFBQUFBLEdBQUcsQ0FBQ0csSUFBSixDQUFTRCxHQUFUO0FBQ0Q7O0FBQ0QsV0FBS0osSUFBTCxDQUFVSyxJQUFWLENBQWVILEdBQWY7QUFDRDs7QUFDREksSUFBQUEsTUFBTSxDQUFDUixLQUFQLEdBQWVBLDhDQUFmLENBWlksQ0FZVztBQUN4QixJQUVEOzs7OztXQUNBLGtCQUFTUyxHQUFULEVBQWM7QUFDWixVQUFJQSxHQUFHLEN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gWzAsIDRdICBcbi8vIEJPVFRPTSAgICAgICAgICBQTEFZRVIiXSwibmFtZXMiOlsiUGllY2UiLCJCb2FyZCIsImdyaWQiLCJpIiwicm93IiwiaiIsImNvbCIsInB1c2giLCJ3aW5kb3ciLCJwb3MiLCJ0aGF0IiwiZ3JpZFBvcyIsImdldFBpZWNlIiwiY29sb3IiLCJwaWVjZSIsInBvc1N0ciIsIkpTT04iLCJzdHJpbmdpZnkiLCJzcXVhcmUiLCJkb2N1bWVudCIsImdldEVsZW1lbnRCeUlkIiwic2V0UGllY2UiLCJjcmVhdGVFbGVtZW50IiwiY2xhc3NOYW1lIiwidHlwZSIsImlkIiwiYXBwZW5kQ2hpbGQiLCJjaGlsZCIsImZpcnN0Q2hpbGQiLCJzZXRUaW1lb3V0IiwicmVtb3ZlQ2hpbGQiLCJpc0VtcHR5Iiwidmlld1BsYWNlUGllY2UiLCJwb3NpdGlvbiIsIkVycm9yIiwicG9zU3RhcnQiLCJwb3NFbmQiLCJwYXduIiwicmVtb3ZlUGllY2UiLCJwbGFjZVBpZWNlIiwicGF3bkIxIiwicGF3bkIyIiwicGF3bkIzIiwicGF3bkI0IiwicGF3bkI1IiwicGF3blIxIiwicGF3blIyIiwicGF3blIzIiwicGF3blI0IiwicGF3blI1IiwiY29uc29sZSIsImxvZyJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/scripts/board.js\n");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ Board; }\n/* harmony export */ });\n/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _piece__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./piece */ \"./src/scripts/piece.js\");\n\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\n // import { Player } from \"./player\";\n\nvar Board = /*#__PURE__*/function () {\n function Board() {\n _classCallCheck(this, Board);\n\n // this.player = currentPlayer;\n this.grid = [];\n\n for (var i = 0; i < 5; i++) {\n var row = [];\n\n for (var j = 0; j < 5; j++) {\n var col = null;\n row.push(col);\n }\n\n this.grid.push(row);\n }\n\n this.redShrine = this.grid[4][2];\n this.blueShrine = this.grid[0][2];\n this.winStone = null;\n this.winStream = null;\n window.Piece = _piece__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; // add to window\n } // out of bounds only\n\n\n _createClass(Board, [{\n key: \"validPos\",\n value: function validPos(pos) {\n if (pos[0] < 0 || pos[0] > 4) return false;\n if (pos[1] < 0 || pos[1] > 4) return false;\n return true;\n } // returns true or color\n\n }, {\n key: \"isEmpty\",\n value: function isEmpty(pos) {\n var that = this;\n var gridPos = that.grid[pos[0]][pos[1]];\n\n if (gridPos === null) {\n return true;\n } else {\n return that.getPiece(pos).color;\n }\n }\n }, {\n key: \"getPiece\",\n value: function getPiece(pos) {\n return this.grid[pos[0]][pos[1]];\n }\n }, {\n key: \"viewPlacePiece\",\n value: function viewPlacePiece(pos, piece) {\n var that = this;\n var posStr = JSON.stringify(pos);\n var square = document.getElementById(posStr);\n var setPiece = document.createElement('div');\n setPiece.className = \"\".concat(piece.color, \"-\").concat(piece.type, \"-piece inactive-pawn\");\n setPiece.id = \"pawn\";\n square.appendChild(setPiece);\n that.grid[pos[0]][pos[1]] = piece; // redundant?\n } // after move gets rid of piece view\n\n }, {\n key: \"viewRemovePiece\",\n value: function viewRemovePiece(pos) {\n var that = this;\n var posStr = JSON.stringify(pos);\n var square = document.getElementById(posStr);\n var child = square.firstChild;\n setTimeout(function () {\n return square.removeChild(child);\n }, 2000);\n }\n }, {\n key: \"placePiece\",\n value: function placePiece(pos, piece) {\n var that = this;\n\n if (that.isEmpty(pos)) {\n that.viewPlacePiece(pos, piece);\n piece.position = pos;\n return that.grid[pos[0]][pos[1]] = piece;\n }\n } // win condition capture\n\n }, {\n key: \"winStone\",\n value: function winStone(endPos, piece) {} // win condition shrine\n\n }, {\n key: \"winStream\",\n value: function winStream(endPos, piece) {\n if (piece.type === \"master\" && piece.color === \"blue\" && pos === this.redShrine) {\n this.winStream === \"blue\";\n } else if (piece.type === \"master\" && piece.color === \"red\" && pos === this.blueShrine) {\n this.winStream === \"red\";\n }\n }\n }, {\n key: \"removePiece\",\n value: function removePiece(pos) {\n return this.grid[pos[0]][pos[1]] = null;\n }\n }, {\n key: \"movePiece\",\n value: function movePiece(posStart, posEnd) {\n var pawn = this.getPiece(posStart);\n this.removePiece(posStart);\n return this.placePiece(posEnd, pawn);\n }\n }, {\n key: \"setBoard\",\n value: function setBoard() {\n var pawnB1 = new _piece__WEBPACK_IMPORTED_MODULE_1__[\"default\"]('student', 'blue');\n var pawnB2 = new _piece__WEBPACK_IMPORTED_MODULE_1__[\"default\"]('student', 'blue');\n var pawnB3 = new _piece__WEBPACK_IMPORTED_MODULE_1__[\"default\"]('master', 'blue');\n var pawnB4 = new _piece__WEBPACK_IMPORTED_MODULE_1__[\"default\"]('student', 'blue');\n var pawnB5 = new _piece__WEBPACK_IMPORTED_MODULE_1__[\"default\"]('student', 'blue');\n this.placePiece([0, 0], pawnB1);\n this.placePiece([0, 1], pawnB2);\n this.placePiece([0, 2], pawnB3);\n this.placePiece([0, 3], pawnB4);\n this.placePiece([0, 4], pawnB5);\n var pawnR1 = new _piece__WEBPACK_IMPORTED_MODULE_1__[\"default\"]('student', 'red');\n var pawnR2 = new _piece__WEBPACK_IMPORTED_MODULE_1__[\"default\"]('student', 'red');\n var pawnR3 = new _piece__WEBPACK_IMPORTED_MODULE_1__[\"default\"]('master', 'red');\n var pawnR4 = new _piece__WEBPACK_IMPORTED_MODULE_1__[\"default\"]('student', 'red');\n var pawnR5 = new _piece__WEBPACK_IMPORTED_MODULE_1__[\"default\"]('student', 'red');\n this.placePiece([4, 0], pawnR1);\n this.placePiece([4, 1], pawnR2);\n this.placePiece([4, 2], pawnR3);\n this.placePiece([4, 3], pawnR4);\n this.placePiece([4, 4], pawnR5);\n }\n }, {\n key: \"sayHi\",\n value: function sayHi() {\n console.log('hiiiiii');\n }\n }]);\n\n return Board;\n}(); // export default Board; \n//confirmed by printing below with fill: let col = [`[${i},${j}]`];\n// let board1 = new Board();\n// // assignment works!\n// board1.grid[1][1] = 'hello' // assign\n// console.log(board1.grid);\n// console.log(board1.grid[0][0]);\n// //validPos() works!\n// if (board1.validPos([1, 1])) {\n// console.log('valid!'); //valid\n// } else {\n// console.log('invalid!');\n// }\n// // getPiece() works!\n// console.log(board1.getPiece([1, 1]));\n// // isEmpty() works!\n// console.log(board1.isEmpty([1, 1]));\n// Board should appear: \n// TOP OPPONENT\n// [4, 0] [4, 1] [4, 2] [4, 3] [4, 4] \n// [3, 0] [3, 1] [3, 2] [3, 3] [3, 4] \n// [2, 0] [2, 1] [2, 2] [2, 3] [2, 4] \n// [1, 0] [1, 1] [1, 2] [1, 3] [1, 4] \n// [0, 0] [0, 1] [0, 2] [0, 3] [0, 4] \n// BOTTOM PLAYER\n\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoi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js\n");
/***/ }),
@@ -49,7 +49,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ Game; }\n/* harmony export */ });\n/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n/* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.promise.js */ \"./node_modules/core-js/modules/es.promise.js\");\n/* harmony import */ var core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! regenerator-runtime/runtime.js */ \"./node_modules/regenerator-runtime/runtime.js\");\n/* harmony import */ var regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _deck_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./deck.js */ \"./src/scripts/deck.js\");\n/* harmony import */ var _board_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./board.js */ \"./src/scripts/board.js\");\n/* harmony import */ var _player__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./player */ \"./src/scripts/player.js\");\n\n\n\n\n\n\n\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\n// import Player from './player.js';\n\n\n\n\nvar Game = /*#__PURE__*/function () {\n function Game() {\n _classCallCheck(this, Game);\n\n this.activeGame = false;\n this.targetPos = null; // checkHighlight\n\n this.targetCard = null;\n this.targetMoves = null;\n this.activePawn = null; // checkHighlight\n\n this.activeCard = null; // checkHighlight\n\n this.currentPlayerIdx = 0; // aid with dealing cards\n\n this.players = [new _player__WEBPACK_IMPORTED_MODULE_9__[\"default\"](\"Player 1\", \"Blue\"), new _player__WEBPACK_IMPORTED_MODULE_9__[\"default\"](\"Player 2\", \"Red\")];\n this.player = this.currentPlayer;\n this.deck = new _deck_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]();\n this.board = new _board_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"](); // Window debugging:\n\n window.board = this.board;\n window.deck = this.deck;\n window.players = this.players;\n window.player = this.player;\n window.otherPlayer = this.otherPlayer;\n } // getter access like a property:\n\n\n _createClass(Game, [{\n key: \"currentPlayer\",\n get: function get() {\n return this.players[this.currentPlayerIdx];\n }\n }, {\n key: \"otherPlayer\",\n get: function get() {\n return this.players[(this.currentPlayerIdx + 1) % 2];\n } // always 0 or 1 using %\n\n }, {\n key: \"swapTurn\",\n value: function () {\n var _swapTurn = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n this.currentPlayerIdx = (this.currentPlayerIdx + 1) % 2;\n this.player = this.currentPlayer;\n window.player = this.player;\n\n case 3:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function swapTurn() {\n return _swapTurn.apply(this, arguments);\n }\n\n return swapTurn;\n }() // deal alternates between players until 4, then on-deck\n\n }, {\n key: \"dealCard\",\n value: function dealCard() {\n var card = this.deck.deal();\n this.currentPlayer.dealCard(card);\n this.swapTurn();\n } // event handled in index.js \n\n }, {\n key: \"start\",\n value: function start() {\n for (var i = 0; i < 4; i++) {\n this.dealCard();\n }\n\n this.onDeckCard = this.deck.deal();\n this.activeGame = true;\n this.board.setBoard();\n } // all moves\n\n }, {\n key: \"possibleMoves\",\n value: function possibleMoves(card, startPos) {\n // all possible\n var that = this;\n\n if (that.currentPlayerIdx === 0) {\n return that.blueMoves(card, startPos);\n } else {\n return that.redMoves(card, startPos);\n }\n } // limits actual moves by empty and color\n\n }, {\n key: \"allowedMoves\",\n value: function allowedMoves(card, startPos) {\n var that = this;\n if (!that.board.validPos(startPos)) return false;\n var allMoves = that.possibleMoves(card, startPos); // \n\n var realMoves = [];\n\n for (var i = 0; i < allMoves.length; i++) {\n // ;\n if (that.board.validPos(allMoves[i])) {\n if (that.board.isEmpty(allMoves[i]) === true) {\n realMoves.push(allMoves[i]);\n } else {\n if (that.board.getPiece(allMoves[i]).color !== that.player.color.toLowerCase()) {\n realMoves.push(allMoves[i]);\n }\n }\n }\n }\n\n return realMoves;\n }\n }, {\n key: \"blueMoves\",\n value: function blueMoves(card, startPos) {\n var that = this;\n\n for (var i = 0; i < that.player.hand.length; i++) {\n if (that.player.hand[i] === card) {\n // changed from includes\n console.log(\"ok\");\n var moves = that.player.hand[i].slice(1);\n var possiblePos = [];\n\n for (var j = 0; j < moves.length; j++) {\n var row = startPos[0] + moves[j][0];\n var col = startPos[1] + moves[j][1];\n possiblePos.push([row, col]);\n }\n\n return possiblePos;\n } else {\n console.log(\"Card is not in your hand\"); // all returning else\n }\n }\n }\n }, {\n key: \"oppMoves\",\n value: function oppMoves(moves) {\n // flips opponent possible pos \n var newMoves = [];\n console.log(moves);\n\n for (var i = 0; i < moves.length; i++) {\n var subArr = [];\n\n for (var j = 0; j < moves[0].length; j++) {\n var ele = moves[i][j];\n\n if (ele === 0) {\n subArr.push(ele);\n } else {\n subArr.push(moves[i][j] * -1);\n }\n }\n\n newMoves.push(subArr);\n }\n\n return newMoves;\n }\n }, {\n key: \"redMoves\",\n value: function redMoves(card, startPos) {\n var that = this;\n\n for (var i = 0; i < that.player.hand.length; i++) {\n if (that.player.hand[i] === card) {\n // changed from .includes \n var moves = that.player.hand[i].slice(1);\n var movesRev = that.oppMoves(moves);\n var possiblePos = [];\n\n for (var j = 0; j < movesRev.length; j++) {\n var row = startPos[0] + movesRev[j][0];\n var col = startPos[1] + movesRev[j][1];\n possiblePos.push([row, col]);\n }\n\n return possiblePos;\n } else {\n console.log(\"Card is not in your hand\");\n }\n }\n }\n }, {\n key: \"checkHighlight\",\n value: function checkHighlight() {\n var allCards = document.querySelectorAll(\".back\");\n var allPawns = document.querySelectorAll(\"#pawn\");\n var that = this;\n allPawns.forEach(function (pawn) {\n if (pawn.classList.contains(\"active-pawn\")) {\n that.activePawn = pawn;\n that.targetPos = that.currentPos(pawn);\n console.log(\"Found active pawn!\");\n }\n });\n allCards.forEach(function (card) {\n if (card.classList.contains(\"active-card\")) {\n console.log(\"Found active card!\");\n that.activeCard = card;\n that.targetCard = that.currentCard(card);\n }\n });\n\n if (that.activePawn !== null && that.activeCard !== null) {\n console.log(\"Both Active!\");\n that.targetMoves = that.viewMoves(); // highlight pos \n } else {\n return false;\n } // debugger\n\n } // sets game.targetPos in checkHighlight\n\n }, {\n key: \"currentPos\",\n value: function currentPos(pawnEl) {\n // const that = this;\n var pos = [];\n var posStr = pawnEl.parentElement.id;\n var strArr = posStr.slice(1, posStr.length).split(\",\");\n\n for (var i = 0; i < strArr.length; i++) {\n pos.push(parseInt(strArr[i]));\n }\n\n return pos;\n } // sets game.targetCard in checkHighlight\n\n }, {\n key: \"currentCard\",\n value: function currentCard(cardEl) {\n console.log(\"in currentCard\");\n var that = this;\n var cardStr = cardEl.id.slice(4);\n var cardNum = parseInt(cardStr);\n if (cardNum === 1) return that.players[0].hand[0];\n if (cardNum === 2) return that.players[0].hand[1];\n if (cardNum === 3) return null; // need onDeck? Maybe not.\n\n if (cardNum === 4) return that.players[1].hand[0];\n if (cardNum === 5) return that.players[1].hand[1];\n }\n }, {\n key: \"viewMovePiece\",\n value: function viewMovePiece(posEndEle) {\n var that = this;\n var posStart = that.currentPos(that.activePawn);\n var posEnd = that.convertStrPos(posEndEle.id); // debugger;\n\n if (board.grid[posEnd[0]][posEnd[1]] !== null) {\n that.board.removePiece(posEnd);\n that.board.viewRemovePiece(posEnd); // takes piece\n }\n\n that.board.movePiece(posStart, posEnd); // coded movePiece calls viewPlacePiece\n\n var piece = that.board.getPiece(posEnd); // Piece\n // debugger\n\n that.board.viewRemovePiece(posStart); // remove old pos\n // TURN SWAP \n\n setTimeout(function () {\n that.viewSwapTurn();\n }, 2000);\n }\n }, {\n key: \"viewSwapUsedCard\",\n value: function () {\n var _viewSwapUsedCard = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(playedCardEl, deckCardEl) {\n var that, currentHand, playedCard, deckCard, playedCardIdx, i, newPlayerCard, newDeckCard;\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n console.log(\"in swap used\");\n that = this;\n currentHand = that.player.hand;\n playedCard = that.currentCard(playedCardEl);\n deckCard = that.onDeckCard;\n playedCardIdx = null;\n\n for (i = 0; i < currentHand.length; i++) {\n // debugger\n if (playedCard === currentHand[i]) playedCardIdx = i;\n } // board swap\n\n\n newPlayerCard = deckCard;\n newDeckCard = playedCard;\n currentHand[playedCardIdx] = newPlayerCard;\n deckCard = newDeckCard;\n this.onDeckCard = newDeckCard; // new\n // debugger;\n // view swap\n\n that.deck.viewDealSwap(newPlayerCard, playedCardEl);\n that.deck.viewDealSwap(newDeckCard, deckCardEl);\n\n case 14:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n\n function viewSwapUsedCard(_x, _x2) {\n return _viewSwapUsedCard.apply(this, arguments);\n }\n\n return viewSwapUsedCard;\n }()\n }, {\n key: \"viewSwapTurn\",\n value: function viewSwapTurn() {\n var that = this;\n var playedCard = document.querySelector(\".active-card\");\n var deckCard = document.querySelector(\"#back3\"); // squares remove highlight\n\n var allSquares = document.getElementsByClassName('square');\n\n for (var i = 0; i < allSquares.length; i++) {\n allSquares[i].classList.remove(\"active\");\n allSquares[i].classList.add(\"inactive\");\n } // pawns remove highlight\n\n\n var allPawns = document.querySelectorAll(\"#pawn\");\n allPawns.forEach(function (pawn) {\n if (pawn.classList.contains(\"active-pawn\")) {\n pawn.classList.remove(\"active-pawn\");\n pawn.classList.add(\"inactive-pawn\");\n }\n }); // hide used cards\n\n setTimeout(function () {\n // flip used\n that.deck.viewToggleFlipTurn().then(setTimeout(function () {\n // swap used\n that.viewSwapUsedCard(playedCard, deckCard).then(setTimeout(function () {\n // flip back\n that.deck.viewToggleFlipTurn().then(setTimeout(function () {\n // rm highlight\n that.viewRemoveCardHighlight().then( // swap turn @ board\n that.swapTurn());\n }, 600));\n }, 600));\n }, 600));\n }, 1000);\n } // card remove highlight\n\n }, {\n key: \"viewRemoveCardHighlight\",\n value: function () {\n var _viewRemoveCardHighlight = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {\n var allCards;\n return regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n allCards = document.querySelectorAll(\".back\");\n allCards.forEach(function (card) {\n card.classList.remove(\"active-card\");\n card.classList.add(\"inactive-card\");\n });\n\n case 2:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3);\n }));\n\n function viewRemoveCardHighlight() {\n return _viewRemoveCardHighlight.apply(this, arguments);\n }\n\n return viewRemoveCardHighlight;\n }()\n }, {\n key: \"viewMoves\",\n value: function viewMoves() {\n var that = this;\n var highlightMoves = that.allowedMoves(that.targetCard, that.targetPos);\n var viewSquares = [];\n\n for (var i = 0; i < highlightMoves.length; i++) {\n var squareSelector = JSON.stringify(highlightMoves[i]);\n var square = document.getElementById(squareSelector);\n viewSquares.push(square);\n }\n\n var allSquares = document.getElementsByClassName('square');\n\n for (var _i = 0; _i < allSquares.length; _i++) {\n allSquares[_i].classList.remove(\"active\");\n\n allSquares[_i].classList.add(\"inactive\");\n }\n\n for (var _i2 = 0; _i2 < viewSquares.length; _i2++) {\n viewSquares[_i2].classList.add(\"active\");\n\n viewSquares[_i2].classList.remove(\"inactive\");\n }\n\n return highlightMoves;\n } // '[1,2]' to [1,2]\n\n }, {\n key: \"convertStrPos\",\n value: function convertStrPos(strPos) {\n var arr = [];\n var strArr = strPos.slice(1, 4).split(','); // ['1', '2']\n\n strArr.forEach(function (ele) {\n arr.push(parseInt(ele));\n });\n return arr;\n }\n }]);\n\n return Game;\n}(); // consider adding a KEY:value list of variables like pawn, master, or player \n// also where to keep card objects?\n// function addGlobalEventListener(type, selector, callback) {\n// document.addEventListener(type, e => {\n// if (e.target.matches(selector)) callback(e);\n// });\n// }\n// function createGrid() {\n// const gameBoard = document.getElementById(\"board\");\n// for (let i = 0; i < 5; i++) {\n// for (let j = 0; j < 5; j++) {\n// let square = document.createElement(\"div\");\n// square.classList.add(\"square\");\n// square.setAttribute(\"id\", [i, j]);\n// // gameBoard.appendChild(square);\n// }\n// }\n// }\n// createGrid();\n\n\n//# sourceURL=[module]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3blwiKTtcbiAgICBhbGxQYXducy5mb3JFYWNoKGZ1bmN0aW9uIChwYXduKSB7XG4gICAgICBpZiAocGF3bi5jbGFzc0xpc3QuY29udGFpbnMoXCJhY3RpdmUtcGF3blwiKSkge1xuICAgICAgICBwYXduLmNsYXNzTGlzdC5yZW1vdmUoXCJhY3RpdmUtcGF3blwiKTtcbiAgICAgICAgcGF3bi5jbGFzc0xpc3QuYWRkKFwiaW5hY3RpdmUtcGF3blwiKTtcbiAgICAgIH1cbiAgICB9KTtcblxuICAgIC8vIGhpZGUgdXNlZCBjYXJkc1xuICAgIHNldFRpbWVvdXQoKCkgPT4ge1xuICAgICAgLy8gZmxpcCB1c2VkXG4gICAgICB0aGF0LmRlY2sudmlld1RvZ2dsZUZsaXBUdXJuKCkudGhlbihcbiAgICAgICAgc2V0VGltZW91dCgoKSA9PiB7XG4gICAgICAgICAgLy8gc3dhcCB1c2VkXG4gICAgICAgICAgdGhhdC52aWV3U3dhcFVzZWRDYXJkKHBsYXllZENhcmQsIGRlY2tDYXJkKS50aGVuKFxuICAgICAgICAgICAgc2V0VGltZW91dCgoKSA9PiB7XG4gICAgICAgICAgICAgIC8vIGZsaXAgYmFja1xuICAgICAgICAgICAgICB0aGF0LmRlY2sudmlld1RvZ2dsZUZsaXBUdXJuKCkudGhlbihcbiAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KCgpID0+IHtcbiAgICAgICAgICAgICAgICAgIC8vIHJtIGhpZ2hsaWdodFxuICAgICAgICAgICAgICAgICAgdGhhdC52aWV3UmVtb3ZlQ2FyZEhpZ2hsaWdodCgpLnRoZW4oXG4gICAgICAgICAgICAgICAgICAgIC8vIHN3YXAgdHVybiBAIGJvYXJkXG4gICAgICAgICAgICAgICAgICAgIHRoYXQuc3dhcFR1cm4oKVxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgfSwgNjAwKVxuICAgICAgICAgICAgICApXG4gICAgICAgICAgICB9LCA2MDApXG4gICAgICAgICAgK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FyZEhpZ2hsaWdodCIsImhpZ2hsaWdodE1vdmVzIiwiYWxsb3dlZE1vdmVzIiwidmlld1NxdWFyZXMiLCJzcXVhcmVTZWxlY3RvciIsIkpTT04iLCJzdHJpbmdpZnkiLCJzcXVhcmUiLCJnZXRFbGVtZW50QnlJZCIsInN0clBvcyIsImFyciJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/scripts/game.js\n");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ Game; }\n/* harmony export */ });\n/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n/* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.promise.js */ \"./node_modules/core-js/modules/es.promise.js\");\n/* harmony import */ var core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! regenerator-runtime/runtime.js */ \"./node_modules/regenerator-runtime/runtime.js\");\n/* harmony import */ var regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _deck_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./deck.js */ \"./src/scripts/deck.js\");\n/* harmony import */ var _board_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./board.js */ \"./src/scripts/board.js\");\n/* harmony import */ var _player__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./player */ \"./src/scripts/player.js\");\n\n\n\n\n\n\n\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\n// import Player from './player.js';\n\n\n\n\nvar Game = /*#__PURE__*/function () {\n function Game() {\n _classCallCheck(this, Game);\n\n this.activeGame = false;\n this.targetPos = null; // checkHighlight\n\n this.targetCard = null;\n this.targetMoves = null;\n this.activePawn = null; // checkHighlight\n\n this.activeCard = null; // checkHighlight\n\n this.currentPlayerIdx = 0; // aid with dealing cards\n\n this.players = [new _player__WEBPACK_IMPORTED_MODULE_9__[\"default\"](\"Player 1\", \"Blue\"), new _player__WEBPACK_IMPORTED_MODULE_9__[\"default\"](\"Player 2\", \"Red\")];\n this.player = this.currentPlayer;\n this.deck = new _deck_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]();\n this.board = new _board_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"](); // Window debugging:\n\n window.board = this.board;\n window.deck = this.deck;\n window.players = this.players;\n window.player = this.player;\n window.otherPlayer = this.otherPlayer;\n } // getter access like a property:\n\n\n _createClass(Game, [{\n key: \"currentPlayer\",\n get: function get() {\n return this.players[this.currentPlayerIdx];\n }\n }, {\n key: \"otherPlayer\",\n get: function get() {\n return this.players[(this.currentPlayerIdx + 1) % 2];\n } // always 0 or 1 using %\n\n }, {\n key: \"swapTurn\",\n value: function () {\n var _swapTurn = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n this.currentPlayerIdx = (this.currentPlayerIdx + 1) % 2;\n this.player = this.currentPlayer;\n window.player = this.player;\n\n case 3:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function swapTurn() {\n return _swapTurn.apply(this, arguments);\n }\n\n return swapTurn;\n }() // deal alternates between players until 4, then on-deck\n\n }, {\n key: \"dealCard\",\n value: function dealCard() {\n var card = this.deck.deal();\n this.currentPlayer.dealCard(card);\n this.swapTurn();\n } // event handled in index.js \n\n }, {\n key: \"start\",\n value: function start() {\n for (var i = 0; i < 4; i++) {\n this.dealCard();\n }\n\n this.onDeckCard = this.deck.deal();\n this.activeGame = true;\n this.board.setBoard();\n } // all moves\n\n }, {\n key: \"possibleMoves\",\n value: function possibleMoves(card, startPos) {\n // all possible\n var that = this;\n\n if (that.currentPlayerIdx === 0) {\n return that.blueMoves(card, startPos);\n } else {\n return that.redMoves(card, startPos);\n }\n } // limits actual moves by empty and color\n\n }, {\n key: \"allowedMoves\",\n value: function allowedMoves(card, startPos) {\n var that = this;\n if (!that.board.validPos(startPos)) return false;\n var allMoves = that.possibleMoves(card, startPos); // \n\n var realMoves = [];\n\n for (var i = 0; i < allMoves.length; i++) {\n // ;\n if (that.board.validPos(allMoves[i])) {\n if (that.board.isEmpty(allMoves[i]) === true) {\n realMoves.push(allMoves[i]);\n } else {\n if (that.board.getPiece(allMoves[i]).color !== that.player.color.toLowerCase()) {\n realMoves.push(allMoves[i]);\n }\n }\n }\n }\n\n return realMoves;\n }\n }, {\n key: \"blueMoves\",\n value: function blueMoves(card, startPos) {\n var that = this;\n\n for (var i = 0; i < that.player.hand.length; i++) {\n if (that.player.hand[i] === card) {\n // changed from includes\n console.log(\"ok\");\n var moves = that.player.hand[i].slice(1);\n var possiblePos = [];\n\n for (var j = 0; j < moves.length; j++) {\n var row = startPos[0] + moves[j][0];\n var col = startPos[1] + moves[j][1];\n possiblePos.push([row, col]);\n }\n\n return possiblePos;\n } else {\n console.log(\"Card is not in your hand\"); // all returning else\n }\n }\n }\n }, {\n key: \"oppMoves\",\n value: function oppMoves(moves) {\n // flips opponent possible pos \n var newMoves = [];\n console.log(moves);\n\n for (var i = 0; i < moves.length; i++) {\n var subArr = [];\n\n for (var j = 0; j < moves[0].length; j++) {\n var ele = moves[i][j];\n\n if (ele === 0) {\n subArr.push(ele);\n } else {\n subArr.push(moves[i][j] * -1);\n }\n }\n\n newMoves.push(subArr);\n }\n\n return newMoves;\n }\n }, {\n key: \"redMoves\",\n value: function redMoves(card, startPos) {\n var that = this;\n\n for (var i = 0; i < that.player.hand.length; i++) {\n if (that.player.hand[i] === card) {\n // changed from .includes \n var moves = that.player.hand[i].slice(1);\n var movesRev = that.oppMoves(moves);\n var possiblePos = [];\n\n for (var j = 0; j < movesRev.length; j++) {\n var row = startPos[0] + movesRev[j][0];\n var col = startPos[1] + movesRev[j][1];\n possiblePos.push([row, col]);\n }\n\n return possiblePos;\n } else {\n console.log(\"Card is not in your hand\");\n }\n }\n }\n }, {\n key: \"checkHighlight\",\n value: function checkHighlight() {\n var allCards = document.querySelectorAll(\".back\");\n var allPawns = document.querySelectorAll(\"#pawn\");\n var that = this;\n allPawns.forEach(function (pawn) {\n if (pawn.classList.contains(\"active-pawn\")) {\n that.activePawn = pawn;\n that.targetPos = that.currentPos(pawn);\n console.log(\"Found active pawn!\");\n }\n });\n allCards.forEach(function (card) {\n if (card.classList.contains(\"active-card\")) {\n console.log(\"Found active card!\");\n that.activeCard = card;\n that.targetCard = that.currentCard(card);\n }\n });\n\n if (that.activePawn !== null && that.activeCard !== null) {\n console.log(\"Both Active!\");\n that.targetMoves = that.viewMoves(); // highlight pos \n } else {\n return false;\n } // debugger\n\n } // sets game.targetPos in checkHighlight\n\n }, {\n key: \"currentPos\",\n value: function currentPos(pawnEl) {\n // const that = this;\n var pos = [];\n var posStr = pawnEl.parentElement.id;\n var strArr = posStr.slice(1, posStr.length).split(\",\");\n\n for (var i = 0; i < strArr.length; i++) {\n pos.push(parseInt(strArr[i]));\n }\n\n return pos;\n } // sets game.targetCard in checkHighlight\n\n }, {\n key: \"currentCard\",\n value: function currentCard(cardEl) {\n console.log(\"in currentCard\");\n var that = this;\n var cardStr = cardEl.id.slice(4);\n var cardNum = parseInt(cardStr);\n if (cardNum === 1) return that.players[0].hand[0];\n if (cardNum === 2) return that.players[0].hand[1];\n if (cardNum === 3) return null; // need onDeck? Maybe not.\n\n if (cardNum === 4) return that.players[1].hand[0];\n if (cardNum === 5) return that.players[1].hand[1];\n }\n }, {\n key: \"viewMovePiece\",\n value: function viewMovePiece(posEndEle) {\n var that = this;\n var posStart = that.currentPos(that.activePawn);\n var posEnd = that.convertStrPos(posEndEle.id); // debugger;\n\n if (board.grid[posEnd[0]][posEnd[1]] !== null) {\n that.board.removePiece(posEnd);\n that.board.viewRemovePiece(posEnd); // takes piece\n }\n\n that.board.movePiece(posStart, posEnd); // coded movePiece calls viewPlacePiece\n\n var piece = that.board.getPiece(posEnd); // Piece\n // debugger\n\n that.board.viewRemovePiece(posStart); // remove old pos\n // TURN SWAP \n\n setTimeout(function () {\n that.viewSwapTurn();\n }, 2000);\n }\n }, {\n key: \"viewSwapUsedCard\",\n value: function () {\n var _viewSwapUsedCard = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(playedCardEl, deckCardEl) {\n var that, currentHand, playedCard, deckCard, playedCardIdx, i, newPlayerCard, newDeckCard;\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n console.log(\"in swap used\");\n that = this;\n currentHand = that.player.hand;\n playedCard = that.currentCard(playedCardEl);\n deckCard = that.onDeckCard;\n playedCardIdx = null;\n\n for (i = 0; i < currentHand.length; i++) {\n // debugger\n if (playedCard === currentHand[i]) playedCardIdx = i;\n } // board swap\n\n\n newPlayerCard = deckCard;\n newDeckCard = playedCard;\n currentHand[playedCardIdx] = newPlayerCard;\n deckCard = newDeckCard;\n this.onDeckCard = newDeckCard; // new\n // debugger;\n // view swap\n\n that.deck.viewDealSwap(newPlayerCard, playedCardEl);\n that.deck.viewDealSwap(newDeckCard, deckCardEl);\n\n case 14:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n\n function viewSwapUsedCard(_x, _x2) {\n return _viewSwapUsedCard.apply(this, arguments);\n }\n\n return viewSwapUsedCard;\n }()\n }, {\n key: \"viewSwapTurn\",\n value: function viewSwapTurn() {\n var that = this;\n var playedCard = document.querySelector(\".active-card\");\n var deckCard = document.querySelector(\"#back3\"); // squares remove highlight\n\n var allSquares = document.getElementsByClassName('square');\n\n for (var i = 0; i < allSquares.length; i++) {\n allSquares[i].classList.remove(\"active\");\n allSquares[i].classList.add(\"inactive\");\n } // pawns remove highlight\n\n\n var allPawns = document.querySelectorAll(\"#pawn\");\n allPawns.forEach(function (pawn) {\n if (pawn.classList.contains(\"active-pawn\")) {\n pawn.classList.remove(\"active-pawn\");\n pawn.classList.add(\"inactive-pawn\");\n }\n }); // hide used cards\n\n setTimeout(function () {\n // flip used\n that.deck.viewToggleFlipTurn().then(setTimeout(function () {\n // swap used\n that.viewSwapUsedCard(playedCard, deckCard).then(setTimeout(function () {\n // flip back\n that.deck.viewToggleFlipTurn().then(setTimeout(function () {\n // rm highlight\n that.viewRemoveCardHighlight().then( // swap turn @ board\n that.swapTurn());\n }, 600));\n }, 600));\n }, 600));\n }, 1000);\n } // card remove highlight\n\n }, {\n key: \"viewRemoveCardHighlight\",\n value: function () {\n var _viewRemoveCardHighlight = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {\n var allCards;\n return regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n allCards = document.querySelectorAll(\".back\");\n allCards.forEach(function (card) {\n card.classList.remove(\"active-card\");\n card.classList.add(\"inactive-card\");\n });\n\n case 2:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3);\n }));\n\n function viewRemoveCardHighlight() {\n return _viewRemoveCardHighlight.apply(this, arguments);\n }\n\n return viewRemoveCardHighlight;\n }()\n }, {\n key: \"viewMoves\",\n value: function viewMoves() {\n var that = this;\n var highlightMoves = that.allowedMoves(that.targetCard, that.targetPos);\n var viewSquares = [];\n\n for (var i = 0; i < highlightMoves.length; i++) {\n var squareSelector = JSON.stringify(highlightMoves[i]);\n var square = document.getElementById(squareSelector);\n viewSquares.push(square);\n }\n\n var allSquares = document.getElementsByClassName('square');\n\n for (var _i = 0; _i < allSquares.length; _i++) {\n allSquares[_i].classList.remove(\"active\");\n\n allSquares[_i].classList.add(\"inactive\");\n }\n\n for (var _i2 = 0; _i2 < viewSquares.length; _i2++) {\n viewSquares[_i2].classList.add(\"active\");\n\n viewSquares[_i2].classList.remove(\"inactive\");\n }\n\n return highlightMoves;\n } // '[1,2]' to [1,2]\n\n }, {\n key: \"convertStrPos\",\n value: function convertStrPos(strPos) {\n var arr = [];\n var strArr = strPos.slice(1, 4).split(','); // ['1', '2']\n\n strArr.forEach(function (ele) {\n arr.push(parseInt(ele));\n });\n return arr;\n }\n }]);\n\n return Game;\n}(); // consider adding a KEY:value list of variables like pawn, master, or player \n// also where to keep card objects?\n// function addGlobalEventListener(type, selector, callback) {\n// document.addEventListener(type, e => {\n// if (e.target.matches(selector)) callback(e);\n// });\n// }\n// function createGrid() {\n// const gameBoard = document.getElementById(\"board\");\n// for (let i = 0; i < 5; i++) {\n// for (let j = 0; j < 5; j++) {\n// let square = document.createElement(\"div\");\n// square.classList.add(\"square\");\n// square.setAttribute(\"id\", [i, j]);\n// // gameBoard.appendChild(square);\n// }\n// }\n// }\n// createGrid();\n\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvc2NyaXB0cy9nYW1lLmpzLmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBO0FBQ0E7QUFDQTtBQUNBOztJQUVxQkc7QUFDbkIsa0JBQWM7QUFBQTs7QUFDWixTQUFLQyxVQUFMLEdBQWtCLEtBQWxCO0FBQ0EsU0FBS0MsU0FBTCxHQUFpQixJQUFqQixDQUZZLENBRWM7O0FBQzFCLFNBQUtDLFVBQUwsR0FBa0IsSUFBbEI7QUFDQSxTQUFLQyxXQUFMLEdBQW1CLElBQW5CO0FBQ0EsU0FBS0MsVUFBTCxHQUFrQixJQUFsQixDQUxZLENBS2M7O0FBQzFCLFNBQUtDLFVBQUwsR0FBa0IsSUFBbEIsQ0FOWSxDQU1jOztBQUMxQixTQUFLQyxnQkFBTCxHQUF3QixDQUF4QixDQVBZLENBT2dCOztBQUM1QixTQUFLQyxPQUFMLEdBQWUsQ0FBQyxJQUFJVCwrQ0FBSixDQUFXLFVBQVgsRUFBdUIsTUFBdkIsQ0FBRCxFQUFpQyxJQUFJQSwrQ0FBSixDQUFXLFVBQVgsRUFBdUIsS0FBdkIsQ0FBakMsQ0FBZjtBQUNBLFNBQUtVLE1BQUwsR0FBYyxLQUFLQyxhQUFuQjtBQUNBLFNBQUtDLElBQUwsR0FBWSxJQUFJZCxnREFBSixFQUFaO0FBQ0EsU0FBS2UsS0FBTCxHQUFhLElBQUlkLGlEQUFKLEVBQWIsQ0FYWSxDQWFaOztBQUNBZSxJQUFBQSxNQUFNLENBQUNELEtBQVAsR0FBZS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xuICAgIH1cblxuICAgIC8vIHBhd25zIHJlbW92ZSBoaWdobGlnaHRcbiAgICBsZXQgYWxsUGF3bnMgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKFwiI3Bhd25cIik7XG4gICAgYWxsUGF3bnMuZm9yRWFjaChmdW5jdGlvbiAocGF3bikge1xuICAgICAgaWYgKHBhd24uY2xhc3NMaXN0LmNvbnRhaW5zKFwiYWN0aXZlLXBhd25cIikpIHtcbiAgICAgICAgcGF3bi5jbGFzc0xpc3QucmVtb3ZlKFwiYWN0aXZlLXBhd25cIik7XG4gICAgICAgIHBhd24uY2xhc3NMaXN0LmFkZChcImluYWN0aXZlLXBhd25cIik7XG4gICAgICB9XG4gICAgfSk7XG5cbiAgICAvLyBoaWRlIHVzZWQgY2FyZHNcbiAgICBzZXRUaW1lb3V0KCgpID0+IHtcbiAgICAgIC8vIGZsaXAgdXNlZFxuICAgICAgdGhhdC5kZWNrLnZpZXdUb2dnbGVGbGlwVHVybigpLnRoZW4oXG4gICAgICAgIHNldFRpbWVvdXQoKCkgPT4ge1xuICAgICAgICAgIC8vIHN3YXAgdXNlZFxuICAgICAgICAgIHRoYXQudmlld1N3YXBVc2VkQ2FyZChwbGF5ZWRDYXJkLCBkZWNrQ2FyZCkudGhlbihcbiAgICAgICAgICAgIHNldFRpbWVvdXQoKCkgPT4ge1xuICAgICAgICAgICAgICAvLyBmbGlwIGJhY2tcbiAgICAgICAgICAgICAgdGhhdC5kZWNrLnZpZXdUb2dnbGVGbGlwVHVybigpLnRoZW4oXG4gICAgICAgICAgICAgICAgc2V0VGltZW91dCgoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAvLyBybSBoaWdobGlnaHRcbiAgICAgICAgICAgICAgICAgIHRoYXQudmlld1JlbW92ZUNhcmRIaWdobGlnaHQoKS50aGVuKFxuICAgICAgICAgICAgICAgICAgICAvLyBzd2FwIHR1cm4gQCBib2FyZFxuICAgICAgICAgICAgICAgICAgICB0aGF0LnN3YXBU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SIsInJlbW92ZSIsImFkZCIsInZpZXdUb2dnbGVGbGlwVHVybiIsInRoZW4iLCJ2aWV3U3dhcFVzZWRDYXJkIiwidmlld1JlbW92ZUNhcmRIaWdobGlnaHQiLCJoaWdobGlnaHRNb3ZlcyIsImFsbG93ZWRNb3ZlcyIsInZpZXdTcXVhcmVzIiwic3F1YXJlU2VsZWN0b3IiLCJKU09OIiwic3RyaW5naWZ5Iiwic3F1YXJlIiwiZ2V0RWxlbWVudEJ5SWQiLCJzdHJQb3MiLCJhcnIiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/scripts/game.js\n");
/***/ }),
@@ -60,7 +60,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"modalFill\": function() { return /* binding */ modalFill; }\n/* harmony export */ });\nvar modalFill = \"\\n How to Play Onitama
\\n\\n \\n Onitama is simple and quick variation on chess. Games typically take 5-15 minutes.\\n\\n
Setup and the Board
\\n \\n - Press the Start Game button.
\\n\\n - Each player receives 4 'Student' pawns (circle) and 1 'Master' pawn (square).
\\n \\n - Player 1 pawns are set in blue, and Player 2 in red.
\\n \\n - Each new game will randomly select 5 movement cards from the total possible 16.
\\n\\n - Each player receives 2 cards in their hand, and 1 is placed outside of the board (right).
\\n\\n - Player 1 (blue) movement cards are below the board, and Player 2 (red )movement cards are above.
\\n\\n - To end the game at any time or redeal the movement cards, press the End Game button.
\\n\\n - Player 1 goes first!
\\n
\\n\\n 1. Move and Attack
\\n\\n \\n - Select (click) one of your pawns. Selected pawns will highlight yellow.
\\n - Select (click) one of your cards. Selected cards will highlight yellow.
\\n - Once both a card and pawn are selected, the board will display the possible moves on the board using that pawn and card by highlighting a tile in green.
\\n - Select (click) the tile to move and end your turn.
\\n - If the tile contains an enemy pawn, it will be 'captured' and removed from the board.
\\n
\\n\\n\\n 2. Swap Turns and Cards
\\n\\n \\n - The move card you used will flip and be exchanged for the move card outside the board, a new movement for next turn!
\\n - Be careful! At the end of your opponents turn they will also exchange, and gain the move you just used!
\\n
\\n\\n 3. Win the Game
\\n\\n There are two ways to win the game:\\n \\n - Way of the Stone: win by capturing your opponent's 'Master' pawn.
\\n - Way of the Stream: win by moving your own 'Master' into your opponents 'Temple Arch' space (the 'Master' starting space).
\\n
\\n\\n\\n About
\\n Onitama is a two-player chess variant where the player moves pawns across a 5x5 grid using a set of five movement cards.\\n
\\n \\n The player may use a card to move any of their pawns in the pattern depicted, however, this card is then exchanged with\\n a card outside the board. This allows both players rotating access to all 5 movement cards in play!
\\n \\n The game is easy to learn thanks to its unique visual design. It also allows for a high level of strategic gameplay with\\n it's dynamic moveset.
\\n\\n Onitama was designed by Shimpei Sato and published in print by Arcane Wonders. Learn more and support the original designer and\\n publisher here.\\n
\\n \";//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvc2NyaXB0cy9tb2RhbC5qcy5qcyIsIm1hcHBpbmdzIjoiOzs7O0FBQU8sSUFBTUEsU0FBUywwMUZBQWYiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9vbml0YW1hX2pzLy4vc3JjL3NjcmlwdHMvbW9kYWwuanM/YTBlYSJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY29uc3QgbW9kYWxGaWxsID0gXG5gXG4gIDxoMj5Ib3cgdG8gUGxheSBPbml0YW1hPC9oMj5cblxuICA8cD5cbiAgICBPbml0YW1hIGlzIHNpbXBsZSBhbmQgcXVpY2sgdmFyaWF0aW9uIG9uIGNoZXNzLiAgR2FtZXMgdHlwaWNhbGx5IHRha2UgNS0xNSBtaW51dGVzLlxuXG4gIDxoMz5TZXR1cCBhbmQgdGhlIEJvYXJkPC9oMz5cbiAgICA8dWw+XG4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b3dzIGZvciBhIGhpZ2ggbGV2ZWwgb2Ygc3RyYXRlZ2ljIGdhbWVwbGF5IHdpdGhcbiAgICBpdCdzIGR5bmFtaWMgbW92ZXNldC48YnI+XG5cbiAgICBPbml0YW1hIHdhcyBkZXNpZ25lZCBieSBTaGltcGVpIFNhdG8gYW5kIHB1Ymxpc2hlZCBpbiBwcmludCBieSBBcmNhbmUgV29uZGVycy4gTGVhcm4gbW9yZSBhbmQgc3VwcG9ydCB0aGUgb3JpZ2luYWwgZGVzaWduZXIgYW5kXG4gICAgcHVibGlzaGVyIDxhIGhyZWY9XCJodHRwczovL3d3dy5hcmNhbmV3b25kZXJzLmNvbS9wcm9kdWN0L29uaXRhbWEvXCI+aGVyZTwvYT4uXG4gIDwvcD5cbiAgYDtcblxuIl0sIm5hbWVzIjpbIm1vZGFsRmlsbCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/scripts/modal.js\n");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"modalFill\": function() { return /* binding */ modalFill; }\n/* harmony export */ });\nvar modalFill = \"\\n How to Play Onitama
\\n
\\n \\n Onitama is simple and quick variation on chess. Games typically take 5-15 minutes.\\n
\\n
Setup and the Board
\\n
\\n \\n - Press the Start Game button.
\\n\\n - Each player receives 4 'Student' pawns (circle) and 1 'Master' pawn (square).
\\n \\n - Player 1 pawns are set in blue, and Player 2 in red.
\\n \\n - Each new game will randomly select 5 movement cards from the total possible 16.
\\n\\n - Each player receives 2 cards in their hand, and 1 is placed outside of the board (right).
\\n\\n - Player 1 (blue) movement cards are below the board, and Player 2 (red )movement cards are above.
\\n\\n - To end the game at any time or redeal the movement cards, press the End Game button.
\\n\\n - Player 1 goes first!
\\n
\\n
\\n 1. Move and Attack
\\n
\\n \\n - Select (click) one of your pawns. Selected pawns will highlight yellow.
\\n - Select (click) one of your cards. Selected cards will highlight yellow.
\\n - Once both a card and pawn are selected, the board will display the possible moves on the board using that pawn and card by highlighting a tile in green.
\\n - Select (click) the tile to move and end your turn.
\\n - If the tile contains an enemy pawn, it will be 'captured' and removed from the board.
\\n
\\n\\n
\\n 2. Swap Turns and Cards
\\n
\\n \\n - The move card you used will flip and be exchanged for the move card outside the board, a new movement for next turn!
\\n - Be careful! At the end of your opponents turn they will also exchange, and gain the move you just used!
\\n
\\n
\\n 3. Win the Game
\\n
\\n There are two ways to win the game:\\n \\n - Way of the Stone: win by capturing your opponent's 'Master' pawn.
\\n - Way of the Stream: win by moving your own 'Master' into your opponents 'Temple Arch' space (the 'Master' starting space).
\\n
\\n\\n
\\n About
\\n Onitama is a two-player chess variant where the player moves pawns across a 5x5 grid using a set of five movement cards.\\n
\\n \\n The player may use a card to move any of their pawns in the pattern depicted, however, this card is then exchanged with\\n a card outside the board. This allows both players rotating access to all 5 movement cards in play!
\\n \\n The game is easy to learn thanks to its unique visual design. It also allows for a high level of strategic gameplay with\\n it's dynamic moveset.
\\n\\n Onitama was designed by Shimpei Sato and published in print by Arcane Wonders. Learn more and support the original designer and\\n publisher here.\\n \\n \";//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvc2NyaXB0cy9tb2RhbC5qcy5qcyIsIm1hcHBpbmdzIjoiOzs7O0FBQU8sSUFBTUEsU0FBUyw0NEZBQWYiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9vbml0YW1hX2pzLy4vc3JjL3NjcmlwdHMvbW9kYWwuanM/YTBlYSJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY29uc3QgbW9kYWxGaWxsID0gXG5gXG4gIDxoMj5Ib3cgdG8gUGxheSBPbml0YW1hPC9oMj5cbiAgPGJyPlxuICA8cD5cbiAgICBPbml0YW1hIGlzIHNpbXBsZSBhbmQgcXVpY2sgdmFyaWF0aW9uIG9uIGNoZXNzLiAgR2FtZXMgdHlwaWNhbGx5I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ZW1lbnQgY2FyZHMgaW4gcGxheSEgPGJyPlxuICAgIFxuICAgIFRoZSBnYW1lIGlzIGVhc3kgdG8gbGVhcm4gdGhhbmtzIHRvIGl0cyB1bmlxdWUgdmlzdWFsIGRlc2lnbi4gSXQgYWxzbyBhbGxvd3MgZm9yIGEgaGlnaCBsZXZlbCBvZiBzdHJhdGVnaWMgZ2FtZXBsYXkgd2l0aFxuICAgIGl0J3MgZHluYW1pYyBtb3Zlc2V0Ljxicj5cblxuICAgIE9uaXRhbWEgd2FzIGRlc2lnbmVkIGJ5IFNoaW1wZWkgU2F0byBhbmQgcHVibGlzaGVkIGluIHByaW50IGJ5IEFyY2FuZSBXb25kZXJzLiBMZWFybiBtb3JlIGFuZCBzdXBwb3J0IHRoZSBvcmlnaW5hbCBkZXNpZ25lciBhbmRcbiAgICBwdWJsaXNoZXIgPGEgaHJlZj1cImh0dHBzOi8vd3d3LmFyY2FuZXdvbmRlcnMuY29tL3Byb2R1Y3Qvb25pdGFtYS9cIj5oZXJlPC9hPi5cbiAgPC9wPlxuICBgO1xuXG4iXSwibmFtZXMiOlsibW9kYWxGaWxsIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/scripts/modal.js\n");
/***/ }),
diff --git a/index.html b/index.html
index 5e87775..03cc9bb 100644
--- a/index.html
+++ b/index.html
@@ -19,7 +19,7 @@
diff --git a/notes_bugs.md b/notes_bugs.md
index 377d4b9..e136ff6 100644
--- a/notes_bugs.md
+++ b/notes_bugs.md
@@ -1,7 +1,13 @@
-## Known Bugs
+## Known Bugs && WIP
+`grid.placePiece` and `grid.removePiece`
+ - possible error, does not remove opposite color object if capture?
+`grid.winStone` and `grid.winStream`
+ - designed to set grid attr to the winning color on true
+ - have not decided where to call, issue with place and remove methods need resolution first
+
diff --git a/src/scripts/board.js b/src/scripts/board.js
index f78314e..ee9bec0 100644
--- a/src/scripts/board.js
+++ b/src/scripts/board.js
@@ -4,7 +4,7 @@ import Piece from "./piece";
export default class Board {
constructor() {
// this.player = currentPlayer;
- this.grid = [];
+ this.grid = [];
for (let i = 0; i < 5; i++) {
let row = [];
for (let j = 0; j < 5; j++) {
@@ -14,6 +14,10 @@ export default class Board {
}
this.grid.push(row);
}
+ this.redShrine = this.grid[4][2];
+ this.blueShrine = this.grid[0][2];
+ this.winStone = null;
+ this.winStream = null;
window.Piece = Piece; // add to window
}
@@ -53,16 +57,10 @@ export default class Board {
// after move gets rid of piece view
viewRemovePiece(pos) {
let that = this;
- // debugger;
let posStr = JSON.stringify(pos);
let square = document.getElementById(posStr);
let child = square.firstChild;
-
- // setTimeout(() => square.child.style = 'opacity = 0.5' , 500);
- // setTimeout(() => square.child.style = 'opacity = 0.3' , 1000);
- // setTimeout(() => square.child.style = 'opacity = 0.2' , 2000);
- setTimeout(() => square.removeChild(child), 3000);
-
+ setTimeout(() => square.removeChild(child), 2000);
}
placePiece(pos, piece) {
@@ -71,8 +69,21 @@ export default class Board {
that.viewPlacePiece(pos, piece);
piece.position = pos;
return (that.grid[pos[0]][pos[1]] = piece);
- } else {
- throw new Error('That position is not valid');
+ }
+ }
+
+
+ // win condition capture
+ winStone(endPos, piece) {
+
+ }
+
+ // win condition shrine
+ winStream(endPos, piece) {
+ if (piece.type === "master" && piece.color === "blue" && pos === this.redShrine) {
+ this.winStream === "blue";
+ } else if (piece.type === "master" && piece.color === "red" && pos === this.blueShrine) {
+ this.winStream === "red";
}
}
@@ -81,11 +92,6 @@ export default class Board {
}
movePiece(posStart, posEnd) {
- // posStart = clicked piece
- // posEnd = clicked space (highlighted)
- // if current player color = selected piece color
- // if selected end position = valid (highlighted)
- // if move options include (highlighted)
let pawn = this.getPiece(posStart);
this.removePiece(posStart);
return this.placePiece(posEnd, pawn);
diff --git a/src/scripts/game.js b/src/scripts/game.js
index f54f4ba..084a9aa 100644
--- a/src/scripts/game.js
+++ b/src/scripts/game.js
@@ -57,7 +57,6 @@ export default class Game {
this.onDeckCard = this.deck.deal();
this.activeGame = true;
this.board.setBoard();
-
}
// all moves
diff --git a/src/scripts/modal.js b/src/scripts/modal.js
index 2f00c4b..7a30524 100644
--- a/src/scripts/modal.js
+++ b/src/scripts/modal.js
@@ -1,11 +1,12 @@
export const modalFill =
`
How to Play Onitama
-
+
Onitama is simple and quick variation on chess. Games typically take 5-15 minutes.
-
+
Setup and the Board
+
- Press the Start Game button.
@@ -23,9 +24,9 @@ export const modalFill =
- Player 1 goes first!
-
+
1. Move and Attack
-
+
- Select (click) one of your pawns. Selected pawns will highlight yellow.
- Select (click) one of your cards. Selected cards will highlight yellow.
@@ -34,23 +35,23 @@ export const modalFill =
- If the tile contains an enemy pawn, it will be 'captured' and removed from the board.
-
+
2. Swap Turns and Cards
-
+
- The move card you used will flip and be exchanged for the move card outside the board, a new movement for next turn!
- Be careful! At the end of your opponents turn they will also exchange, and gain the move you just used!
-
+
3. Win the Game
-
+
There are two ways to win the game:
- Way of the Stone: win by capturing your opponent's 'Master' pawn.
- Way of the Stream: win by moving your own 'Master' into your opponents 'Temple Arch' space (the 'Master' starting space).
-
+
About
Onitama is a two-player chess variant where the player moves pawns across a 5x5 grid using a set of five movement cards.
diff --git a/src/styles/index.css b/src/styles/index.css
index 6400914..5e44800 100644
--- a/src/styles/index.css
+++ b/src/styles/index.css
@@ -5,25 +5,14 @@
}
body {
- /* background: rgb(236,190,70);
- background: radial-gradient(circle, rgba(170, 168, 161, 0.942) 6%, rgb(241, 236, 225) 90%); */
- /* background-color: #EEEE; */
- /* background-color: #b8c6db;
- background-image: linear-gradient(315deg, #b8c6db 0%, #f5f7fa 74%); */
- /* background-color: #ffffff;
- background-image: linear-gradient(315deg, #ffffff 0%, #d7e1ec 74%); */
- /* background-color: #2f4353;
- background-image: linear-gradient(315deg, #2f4353 0%, #d2ccc4 74%); */
background-color: #aee1f9;
background-image: linear-gradient(315deg, #aee1f9 0%, #f6ebe6 74%);
-
margin: 1px;
}
#container {
width: 100%;
- height: 100%;
-
+ height: 100%;
}
@@ -62,8 +51,8 @@ header {
#board {
display: grid;
- grid-template-columns: repeat(5, 1fr); /* five equal 'fractioned' tracks */
- box-sizing: border-box; /*within container */
+ grid-template-columns: repeat(5, 1fr); /* equal 'fractioned' tracks */
+ box-sizing: content-box; /*within container */
padding: 0px;
/* border: 2px solid black; */
border-radius: 6px;
@@ -71,7 +60,6 @@ header {
}
-
.opponent-row {
grid-column: 2 / 4;
grid-row: 2 / 3;
@@ -149,7 +137,7 @@ header {
.modal__howTo {
height: 100%;
- width: 100%;
+ max-width: 100%;
display: flex;
position: fixed;
background-color: rgba(0, 0, 0, 0.25);
@@ -173,7 +161,7 @@ header {
font-size: 1rem;
color: #302f2f;
z-index: 4;
- overflow-y: scroll
+ overflow: auto;
}
.modal__fill-active {