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E,eAAe,mBAI3C+H,EAAkB,KAEpBrE,EAAe6D,SAASO,EAAiBxK,OACzCwH,EAAKzI,iBAAiBqH,GAEnBA,EAAe,GACdiB,EAAU,oFAAqF,YAGvGmD,EAAiBN,SAAWO,EAC5BD,EAAiBxK,MAAQ,EAEzB,MAAMgI,EAAaxF,SAASE,eAAe,eAIrCgI,EAAY,OAGlB1C,EAAWkC,SAAWQ,EAGtB,MAAMC,EAAkBnI,SAASE,eAAe,iBAI1CkI,EAAkB,KAEpBvE,EAAiB4D,SAASU,EAAgB3K,OAAS,IACnDwH,EAAKtI,mBAAmBmH,IAE5BsE,EAAgBT,SAAWU,EAC3BD,EAAgB3K,MAAQ,G","sources":["webpack://draught/../pkg/draught_bg.js","webpack://draught/./index.js"],"sourcesContent":["import * as wasm from './draught_bg.wasm';\n\nconst heap = new Array(32).fill(undefined);\n\nheap.push(undefined, null, true, false);\n\nfunction getObject(idx) { return heap[idx]; }\n\nlet heap_next = heap.length;\n\nfunction dropObject(idx) {\n if (idx < 36) return;\n heap[idx] = heap_next;\n heap_next = idx;\n}\n\nfunction takeObject(idx) {\n const ret = getObject(idx);\n dropObject(idx);\n return ret;\n}\n\nconst lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;\n\nlet cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });\n\ncachedTextDecoder.decode();\n\nlet cachegetUint8Memory0 = null;\nfunction getUint8Memory0() {\n if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) {\n cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachegetUint8Memory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));\n}\n\nfunction addHeapObject(obj) {\n if (heap_next === heap.length) heap.push(heap.length + 1);\n const idx = heap_next;\n heap_next = heap[idx];\n\n heap[idx] = obj;\n return idx;\n}\n\nfunction debugString(val) {\n // primitive types\n const type = typeof val;\n if (type == 'number' || type == 'boolean' || val == null) {\n return `${val}`;\n }\n if (type == 'string') {\n return `\"${val}\"`;\n }\n if (type == 'symbol') {\n const description = val.description;\n if (description == null) {\n return 'Symbol';\n } else {\n return `Symbol(${description})`;\n }\n }\n if (type == 'function') {\n const name = val.name;\n if (typeof name == 'string' && name.length > 0) {\n return `Function(${name})`;\n } else {\n return 'Function';\n }\n }\n // objects\n if (Array.isArray(val)) {\n const length = val.length;\n let debug = '[';\n if (length > 0) {\n debug += debugString(val[0]);\n }\n for(let i = 1; i < length; i++) {\n debug += ', ' + debugString(val[i]);\n }\n debug += ']';\n return debug;\n }\n // Test for built-in\n const builtInMatches = /\\[object ([^\\]]+)\\]/.exec(toString.call(val));\n let className;\n if (builtInMatches.length > 1) {\n className = builtInMatches[1];\n } else {\n // Failed to match the standard '[object ClassName]'\n return toString.call(val);\n }\n if (className == 'Object') {\n // we're a user defined class or Object\n // JSON.stringify avoids problems with cycles, and is generally much\n // easier than looping through ownProperties of `val`.\n try {\n return 'Object(' + JSON.stringify(val) + ')';\n } catch (_) {\n return 'Object';\n }\n }\n // errors\n if (val instanceof Error) {\n return `${val.name}: ${val.message}\\n${val.stack}`;\n }\n // TODO we could test for more things here, like `Set`s and `Map`s.\n return className;\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nconst lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;\n\nlet cachedTextEncoder = new lTextEncoder('utf-8');\n\nconst encodeString = (typeof cachedTextEncoder.encodeInto === 'function'\n ? function (arg, view) {\n return cachedTextEncoder.encodeInto(arg, view);\n}\n : function (arg, view) {\n const buf = cachedTextEncoder.encode(arg);\n view.set(buf);\n return {\n read: arg.length,\n written: buf.length\n };\n});\n\nfunction passStringToWasm0(arg, malloc, realloc) {\n\n if (realloc === undefined) {\n const buf = cachedTextEncoder.encode(arg);\n const ptr = malloc(buf.length);\n getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);\n WASM_VECTOR_LEN = buf.length;\n return ptr;\n }\n\n let len = arg.length;\n let ptr = malloc(len);\n\n const mem = getUint8Memory0();\n\n let offset = 0;\n\n for (; offset < len; offset++) {\n const code = arg.charCodeAt(offset);\n if (code > 0x7F) break;\n mem[ptr + offset] = code;\n }\n\n if (offset !== len) {\n if (offset !== 0) {\n arg = arg.slice(offset);\n }\n ptr = realloc(ptr, len, len = offset + arg.length * 3);\n const view = getUint8Memory0().subarray(ptr + offset, ptr + len);\n const ret = encodeString(arg, view);\n\n offset += ret.written;\n }\n\n WASM_VECTOR_LEN = offset;\n return ptr;\n}\n\nlet cachegetInt32Memory0 = null;\nfunction getInt32Memory0() {\n if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) {\n cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer);\n }\n return cachegetInt32Memory0;\n}\n\nfunction isLikeNone(x) {\n return x === undefined || x === null;\n}\n\nfunction _assertClass(instance, klass) {\n if (!(instance instanceof klass)) {\n throw new Error(`expected instance of ${klass.name}`);\n }\n return instance.ptr;\n}\n/**\n*/\nexport function init_wasm() {\n wasm.init_wasm();\n}\n\nfunction handleError(f, args) {\n try {\n return f.apply(this, args);\n } catch (e) {\n wasm.__wbindgen_exn_store(addHeapObject(e));\n }\n}\n\nfunction getArrayU8FromWasm0(ptr, len) {\n return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);\n}\n/**\n* Move/Jump, for use in Move\n*/\nexport const MoveType = Object.freeze({ Move:0,\"0\":\"Move\",Jump:1,\"1\":\"Jump\", });\n/**\n* Black/White\n*/\nexport const Team = Object.freeze({ Black:0,\"0\":\"Black\",White:1,\"1\":\"White\", });\n/**\n* Man/King\n*/\nexport const Strength = Object.freeze({ Man:0,\"0\":\"Man\",King:1,\"1\":\"King\", });\n/**\n* Model board square as Empty/Occupied/Unplayable\n*/\nexport const SquareState = Object.freeze({ Empty:0,\"0\":\"Empty\",Occupied:1,\"1\":\"Occupied\",Unplayable:2,\"2\":\"Unplayable\", });\n/**\n* Possible outcomes of trying to move\n*/\nexport const Moveable = Object.freeze({ Allowed:0,\"0\":\"Allowed\",UnoccupiedSrc:1,\"1\":\"UnoccupiedSrc\",OccupiedDest:2,\"2\":\"OccupiedDest\",OutOfBounds:3,\"3\":\"OutOfBounds\",Unplayable:4,\"4\":\"Unplayable\",WrongTeamSrc:5,\"5\":\"WrongTeamSrc\",IllegalTrajectory:6,\"6\":\"IllegalTrajectory\",NoJumpablePiece:7,\"7\":\"NoJumpablePiece\",JumpingSameTeam:8,\"8\":\"JumpingSameTeam\", });\n/**\n* Single state of a checkers board\n*/\nexport class Board {\n\n static __wrap(ptr) {\n const obj = Object.create(Board.prototype);\n obj.ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.ptr;\n this.ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_board_free(ptr);\n }\n /**\n */\n get width() {\n const ret = wasm.__wbg_get_board_width(this.ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} arg0\n */\n set width(arg0) {\n wasm.__wbg_set_board_width(this.ptr, arg0);\n }\n /**\n */\n get height() {\n const ret = wasm.__wbg_get_board_height(this.ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} arg0\n */\n set height(arg0) {\n wasm.__wbg_set_board_height(this.ptr, arg0);\n }\n /**\n */\n get current_turn() {\n const ret = wasm.__wbg_get_board_current_turn(this.ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} arg0\n */\n set current_turn(arg0) {\n wasm.__wbg_set_board_current_turn(this.ptr, arg0);\n }\n /**\n * Get a copy of a board square by 1D array index\n * @param {number} idx\n * @returns {Square}\n */\n cell(idx) {\n const ret = wasm.board_cell(this.ptr, idx);\n return Square.__wrap(ret);\n }\n /**\n * Get a copy of a board square by 1D array index\n * @param {number} idx\n * @param {Square} square\n */\n set_cell(idx, square) {\n _assertClass(square, Square);\n var ptr0 = square.ptr;\n square.ptr = 0;\n wasm.board_set_cell(this.ptr, idx, ptr0);\n }\n /**\n * Get a copy of a board square by 2D [`BrdIdx`] index\n * @param {BrdIdx} idx\n * @returns {Square}\n */\n grid_cell(idx) {\n _assertClass(idx, BrdIdx);\n var ptr0 = idx.ptr;\n idx.ptr = 0;\n const ret = wasm.board_grid_cell(this.ptr, ptr0);\n return Square.__wrap(ret);\n }\n /**\n * Transform a 2D row/column board index into a single 1D index for use with [`Board::cells`]\n * @param {number} row\n * @param {number} col\n * @returns {number}\n */\n cell_index(row, col) {\n const ret = wasm.board_cell_index(this.ptr, row, col);\n return ret >>> 0;\n }\n /**\n * Similar to [`Board::cell_index`] but with a [`BrdIdx`] instead of separate indices. Transform a 2D row/column board index into a single 1D index for use with [`Board::cells`]\n * @param {BrdIdx} idx\n * @returns {number}\n */\n cell_idx(idx) {\n _assertClass(idx, BrdIdx);\n var ptr0 = idx.ptr;\n idx.ptr = 0;\n const ret = wasm.board_cell_idx(this.ptr, ptr0);\n return ret >>> 0;\n }\n /**\n * Transform a 1D array index (for [`Board::cells`]) into a 2D game board index (by row/col)\n * @param {number} idx\n * @returns {BrdIdx}\n */\n board_index(idx) {\n const ret = wasm.board_board_index(this.ptr, idx);\n return BrdIdx.__wrap(ret);\n }\n /**\n * Check whether a move given by source and destination indices is legal\n * @param {BrdIdx} from\n * @param {BrdIdx} to\n * @returns {number}\n */\n can_move(from, to) {\n _assertClass(from, BrdIdx);\n var ptr0 = from.ptr;\n from.ptr = 0;\n _assertClass(to, BrdIdx);\n var ptr1 = to.ptr;\n to.ptr = 0;\n const ret = wasm.board_can_move(this.ptr, ptr0, ptr1);\n return ret >>> 0;\n }\n /**\n * Check that given move trajectory is valid for a man piece\n * @param {BrdIdx} from\n * @param {BrdIdx} to\n * @param {Piece} from_square_occupant\n * @returns {number}\n */\n validate_man_move(from, to, from_square_occupant) {\n _assertClass(from, BrdIdx);\n var ptr0 = from.ptr;\n from.ptr = 0;\n _assertClass(to, BrdIdx);\n var ptr1 = to.ptr;\n to.ptr = 0;\n _assertClass(from_square_occupant, Piece);\n var ptr2 = from_square_occupant.ptr;\n from_square_occupant.ptr = 0;\n const ret = wasm.board_validate_man_move(this.ptr, ptr0, ptr1, ptr2);\n return ret >>> 0;\n }\n /**\n * Check that given move trajectory is valid for a king piece\n * @param {BrdIdx} from\n * @param {BrdIdx} to\n * @param {Piece} from_square_occupant\n * @returns {number}\n */\n validate_king_move(from, to, from_square_occupant) {\n _assertClass(from, BrdIdx);\n var ptr0 = from.ptr;\n from.ptr = 0;\n _assertClass(to, BrdIdx);\n var ptr1 = to.ptr;\n to.ptr = 0;\n _assertClass(from_square_occupant, Piece);\n var ptr2 = from_square_occupant.ptr;\n from_square_occupant.ptr = 0;\n const ret = wasm.board_validate_king_move(this.ptr, ptr0, ptr1, ptr2);\n return ret >>> 0;\n }\n /**\n * Get cell index of jumpee square given from and to locations\n * @param {BrdIdx} from\n * @param {BrdIdx} to\n * @returns {number}\n */\n jumpee_idx(from, to) {\n _assertClass(from, BrdIdx);\n var ptr0 = from.ptr;\n from.ptr = 0;\n _assertClass(to, BrdIdx);\n var ptr1 = to.ptr;\n to.ptr = 0;\n const ret = wasm.board_jumpee_idx(this.ptr, ptr0, ptr1);\n return ret >>> 0;\n }\n /**\n * Get a pointer to the backing array of board squares, [`Board::cells`]\n * @returns {number}\n */\n cells() {\n const ret = wasm.board_cells(this.ptr);\n return ret;\n }\n /**\n * Get the number of board squares\n * @returns {number}\n */\n num_cells() {\n const ret = wasm.board_num_cells(this.ptr);\n return ret >>> 0;\n }\n /**\n * Get the number of remaining pieces\n * @returns {number}\n */\n num_pieces() {\n const ret = wasm.board_num_pieces(this.ptr);\n return ret >>> 0;\n }\n /**\n * Get the number of remaining pieces for a player\n * @param {number} team\n * @returns {number}\n */\n num_player(team) {\n const ret = wasm.board_num_player(this.ptr, team);\n return ret >>> 0;\n }\n /**\n * Get the score value, Black - White pieces\n * @returns {number}\n */\n score() {\n const ret = wasm.board_score(this.ptr);\n return ret;\n }\n /**\n * Get the state of a board square by 1D array index\n * @param {number} idx\n * @returns {number}\n */\n cell_state(idx) {\n const ret = wasm.board_cell_state(this.ptr, idx);\n return ret >>> 0;\n }\n /**\n * Get new board derived from current with given move applied\n * @param {BrdIdx} from\n * @param {BrdIdx} to\n * @returns {Board}\n */\n apply_move(from, to) {\n _assertClass(from, BrdIdx);\n var ptr0 = from.ptr;\n from.ptr = 0;\n _assertClass(to, BrdIdx);\n var ptr1 = to.ptr;\n to.ptr = 0;\n const ret = wasm.board_apply_move(this.ptr, ptr0, ptr1);\n return Board.__wrap(ret);\n }\n /**\n * Get new board derived from current with given jump applied\n * @param {BrdIdx} from\n * @param {BrdIdx} to\n * @returns {Board}\n */\n apply_jump(from, to) {\n _assertClass(from, BrdIdx);\n var ptr0 = from.ptr;\n from.ptr = 0;\n _assertClass(to, BrdIdx);\n var ptr1 = to.ptr;\n to.ptr = 0;\n const ret = wasm.board_apply_jump(this.ptr, ptr0, ptr1);\n return Board.__wrap(ret);\n }\n /**\n * Get row index for current team, top row for black, bottom row for white\n * @returns {number}\n */\n king_row_idx() {\n const ret = wasm.board_king_row_idx(this.ptr);\n return ret >>> 0;\n }\n /**\n * Unwrap the jumpee piece from the square and [`Board::check_jumpee_team`] with [`Moveable`] response\n * @param {Square} jumpee\n * @param {Piece} from_occ\n * @returns {number}\n */\n static validate_jumpee(jumpee, from_occ) {\n _assertClass(jumpee, Square);\n var ptr0 = jumpee.ptr;\n jumpee.ptr = 0;\n _assertClass(from_occ, Piece);\n var ptr1 = from_occ.ptr;\n from_occ.ptr = 0;\n const ret = wasm.board_validate_jumpee(ptr0, ptr1);\n return ret >>> 0;\n }\n /**\n * Check that the source piece and the jumpee are of opposing teams\n * @param {Piece} from\n * @param {Piece} jumpee\n * @returns {boolean}\n */\n static check_jumpee_team(from, jumpee) {\n _assertClass(from, Piece);\n var ptr0 = from.ptr;\n from.ptr = 0;\n _assertClass(jumpee, Piece);\n var ptr1 = jumpee.ptr;\n jumpee.ptr = 0;\n const ret = wasm.board_check_jumpee_team(ptr0, ptr1);\n return ret !== 0;\n }\n /**\n * Initialise a game board without game pieces\n * @param {number} width\n * @param {number} height\n * @param {number} current_turn\n */\n constructor(width, height, current_turn) {\n const ret = wasm.board_new(width, height, current_turn);\n return Board.__wrap(ret);\n }\n /**\n * Reset the given board to a starting layout with 3 rows of opposing pieces\n * @param {Board} board\n * @param {number} piece_rows\n * @returns {Board}\n */\n static init_game(board, piece_rows) {\n _assertClass(board, Board);\n var ptr0 = board.ptr;\n board.ptr = 0;\n const ret = wasm.board_init_game(ptr0, piece_rows);\n return Board.__wrap(ret);\n }\n}\n/**\n* Rank 2 tensor index to identify a board square by row and column\n*/\nexport class BrdIdx {\n\n static __wrap(ptr) {\n const obj = Object.create(BrdIdx.prototype);\n obj.ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.ptr;\n this.ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_brdidx_free(ptr);\n }\n /**\n */\n get row() {\n const ret = wasm.__wbg_get_brdidx_row(this.ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} arg0\n */\n set row(arg0) {\n wasm.__wbg_set_brdidx_row(this.ptr, arg0);\n }\n /**\n */\n get col() {\n const ret = wasm.__wbg_get_brdidx_col(this.ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} arg0\n */\n set col(arg0) {\n wasm.__wbg_set_brdidx_col(this.ptr, arg0);\n }\n /**\n * @param {number} row\n * @param {number} col\n */\n constructor(row, col) {\n const ret = wasm.brdidx_from(row, col);\n return BrdIdx.__wrap(ret);\n }\n /**\n * @param {BrdIdx} other\n * @returns {boolean}\n */\n eq(other) {\n _assertClass(other, BrdIdx);\n const ret = wasm.brdidx_eq(this.ptr, other.ptr);\n return ret !== 0;\n }\n}\n/**\n* Root-level structure for managing the game as a collection of board states\n*/\nexport class Game {\n\n static __wrap(ptr) {\n const obj = Object.create(Game.prototype);\n obj.ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.ptr;\n this.ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_game_free(ptr);\n }\n /**\n */\n get last_node_count() {\n const ret = wasm.__wbg_get_game_last_node_count(this.ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} arg0\n */\n set last_node_count(arg0) {\n wasm.__wbg_set_game_last_node_count(this.ptr, arg0);\n }\n /**\n */\n get perfect_chance() {\n const ret = wasm.__wbg_get_game_perfect_chance(this.ptr);\n return ret;\n }\n /**\n * @param {number} arg0\n */\n set perfect_chance(arg0) {\n wasm.__wbg_set_game_perfect_chance(this.ptr, arg0);\n }\n /**\n * Get pointer to current board's squares\n * @returns {number}\n */\n current_board_cells() {\n const ret = wasm.game_current_board_cells(this.ptr);\n return ret;\n }\n /**\n * Get pointer to current board's squares\n * @returns {number}\n */\n current_board_len() {\n const ret = wasm.game_current_board_len(this.ptr);\n return ret >>> 0;\n }\n /**\n * Current turn's team\n * @returns {number}\n */\n current_turn() {\n const ret = wasm.game_current_turn(this.ptr);\n return ret >>> 0;\n }\n /**\n * Current board's score\n * @returns {number}\n */\n score() {\n const ret = wasm.game_score(this.ptr);\n return ret;\n }\n /**\n * Get currently winning player\n * @returns {number | undefined}\n */\n winning() {\n const ret = wasm.game_winning(this.ptr);\n return ret === 2 ? undefined : ret;\n }\n /**\n * Check if a player has won\n * @returns {number | undefined}\n */\n has_won() {\n const ret = wasm.game_has_won(this.ptr);\n return ret === 2 ? undefined : ret;\n }\n /**\n * Get square on current board for given index\n * @param {BrdIdx} idx\n * @returns {Square}\n */\n current_cell_state(idx) {\n _assertClass(idx, BrdIdx);\n const ret = wasm.game_current_cell_state(this.ptr, idx.ptr);\n return Square.__wrap(ret);\n }\n /**\n * Set tree depth for AI to search to\n * @param {number} search_depth\n */\n set_search_depth(search_depth) {\n wasm.game_set_search_depth(this.ptr, search_depth);\n }\n /**\n * Set given index as selected piece\n * TODO: Check whether valid square?\n * @param {BrdIdx} idx\n */\n set_selected(idx) {\n _assertClass(idx, BrdIdx);\n wasm.game_set_selected(this.ptr, idx.ptr);\n }\n /**\n * Set proportion of perfect moves from AI\n * @param {number} new_chance\n */\n set_perfect_chance(new_chance) {\n wasm.game_set_perfect_chance(this.ptr, new_chance);\n }\n /**\n * Clear currently selected piece\n */\n clear_selected() {\n wasm.game_clear_selected(this.ptr);\n }\n /**\n * Attempt to make a move given a source and destination index\n * @param {BrdIdx} from\n * @param {BrdIdx} to\n * @returns {number}\n */\n make_move(from, to) {\n _assertClass(from, BrdIdx);\n var ptr0 = from.ptr;\n from.ptr = 0;\n _assertClass(to, BrdIdx);\n var ptr1 = to.ptr;\n to.ptr = 0;\n const ret = wasm.game_make_move(this.ptr, ptr0, ptr1);\n return ret >>> 0;\n }\n /**\n * Update board state with given move and push new board into current state\n * @param {BrdIdx} from\n * @param {BrdIdx} to\n */\n execute_move(from, to) {\n _assertClass(from, BrdIdx);\n var ptr0 = from.ptr;\n from.ptr = 0;\n _assertClass(to, BrdIdx);\n var ptr1 = to.ptr;\n to.ptr = 0;\n wasm.game_execute_move(this.ptr, ptr0, ptr1);\n }\n /**\n * Update board state with given jump move and push new board into current state\n * @param {BrdIdx} from\n * @param {BrdIdx} to\n */\n execute_jump(from, to) {\n _assertClass(from, BrdIdx);\n var ptr0 = from.ptr;\n from.ptr = 0;\n _assertClass(to, BrdIdx);\n var ptr1 = to.ptr;\n to.ptr = 0;\n wasm.game_execute_jump(this.ptr, ptr0, ptr1);\n }\n /**\n * Push current board into the previous turns and set given board to current\n * @param {Board} board\n */\n push_new_board(board) {\n _assertClass(board, Board);\n var ptr0 = board.ptr;\n board.ptr = 0;\n wasm.game_push_new_board(this.ptr, ptr0);\n }\n /**\n * Set current board to given\n * @param {Board} board\n */\n set_current(board) {\n _assertClass(board, Board);\n var ptr0 = board.ptr;\n board.ptr = 0;\n wasm.game_set_current(this.ptr, ptr0);\n }\n /**\n * Get new game without board renderer\n * @param {number} width\n * @param {number} height\n * @param {number} piece_rows\n * @param {number} first_turn\n * @param {number} search_depth\n */\n constructor(width, height, piece_rows, first_turn, search_depth) {\n const ret = wasm.game_new(width, height, piece_rows, first_turn, search_depth);\n return Game.__wrap(ret);\n }\n /**\n * Get a new game with canvas ID and dimensions\n * @param {number} width\n * @param {number} height\n * @param {number} piece_rows\n * @param {number} first_turn\n * @param {number} search_depth\n * @param {string} canvas_id\n * @param {number} canvas_width\n * @param {number} canvas_height\n * @returns {Game}\n */\n static new_with_canvas(width, height, piece_rows, first_turn, search_depth, canvas_id, canvas_width, canvas_height) {\n const ptr0 = passStringToWasm0(canvas_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.game_new_with_canvas(width, height, piece_rows, first_turn, search_depth, ptr0, len0, canvas_width, canvas_height);\n return Game.__wrap(ret);\n }\n /**\n * Set painter for rendering boards\n * @param {Painter} value\n */\n set_painter(value) {\n _assertClass(value, Painter);\n var ptr0 = value.ptr;\n value.ptr = 0;\n wasm.game_set_painter(this.ptr, ptr0);\n }\n /**\n * Draw current board using painter if exists\n */\n draw() {\n wasm.game_draw(this.ptr);\n }\n /**\n * Create computer, get move from current board and update current board\n */\n ai_move() {\n wasm.game_ai_move(this.ptr);\n }\n}\n/**\n* Used to paint boards onto HTML canvases\n*/\nexport class Painter {\n\n static __wrap(ptr) {\n const obj = Object.create(Painter.prototype);\n obj.ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.ptr;\n this.ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_painter_free(ptr);\n }\n /**\n * Default constructor which queries for canvas by ID\n * @param {number} width\n * @param {number} height\n * @param {string} canvas_id\n */\n constructor(width, height, canvas_id) {\n const ptr0 = passStringToWasm0(canvas_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.painter_new(width, height, ptr0, len0);\n return Painter.__wrap(ret);\n }\n /**\n * Constructor with given canvas element\n * @param {number} width\n * @param {number} height\n * @param {HTMLCanvasElement} canvas\n * @returns {Painter}\n */\n static new_with_canvas(width, height, canvas) {\n const ret = wasm.painter_new_with_canvas(width, height, addHeapObject(canvas));\n return Painter.__wrap(ret);\n }\n /**\n * Set new square outline colour value\n * @param {any} value\n */\n set_square_outline(value) {\n wasm.painter_set_square_outline(this.ptr, addHeapObject(value));\n }\n /**\n * Set new line width for outlining squares\n * @param {number} value\n */\n set_outline_width(value) {\n wasm.painter_set_outline_width(this.ptr, value);\n }\n /**\n * Set whether squares are outlined\n * @param {boolean} value\n */\n set_draw_outline(value) {\n wasm.painter_set_draw_outline(this.ptr, value);\n }\n /**\n * Reset the canvas dimensions to the given width and height\n */\n reset_dimensions() {\n wasm.painter_reset_dimensions(this.ptr);\n }\n /**\n * Check whether given canvas dimensions divide evenly by given board dimenions\n * @param {Board} board\n * @returns {boolean}\n */\n validate_board_dim(board) {\n _assertClass(board, Board);\n const ret = wasm.painter_validate_board_dim(this.ptr, board.ptr);\n return ret !== 0;\n }\n /**\n * Draw a board onto the canvas\n * @param {Board} board\n */\n draw(board) {\n _assertClass(board, Board);\n wasm.painter_draw(this.ptr, board.ptr);\n }\n}\n/**\n* Game piece given by its team and strength (normal or kinged)\n*/\nexport class Piece {\n\n static __wrap(ptr) {\n const obj = Object.create(Piece.prototype);\n obj.ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.ptr;\n this.ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_piece_free(ptr);\n }\n /**\n */\n get team() {\n const ret = wasm.__wbg_get_piece_team(this.ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} arg0\n */\n set team(arg0) {\n wasm.__wbg_set_piece_team(this.ptr, arg0);\n }\n /**\n */\n get strength() {\n const ret = wasm.__wbg_get_piece_strength(this.ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} arg0\n */\n set strength(arg0) {\n wasm.__wbg_set_piece_strength(this.ptr, arg0);\n }\n /**\n * @param {number} team\n * @param {number} strength\n */\n constructor(team, strength) {\n const ret = wasm.piece_new(team, strength);\n return Piece.__wrap(ret);\n }\n}\n/**\n* Board squares given by a state and a possible occupying game piece\n*/\nexport class Square {\n\n static __wrap(ptr) {\n const obj = Object.create(Square.prototype);\n obj.ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.ptr;\n this.ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_square_free(ptr);\n }\n /**\n * Game piece if square is occupied\n */\n get occupant() {\n const ret = wasm.__wbg_get_square_occupant(this.ptr);\n return ret === 0 ? undefined : Piece.__wrap(ret);\n }\n /**\n * Game piece if square is occupied\n * @param {Piece | undefined} arg0\n */\n set occupant(arg0) {\n let ptr0 = 0;\n if (!isLikeNone(arg0)) {\n _assertClass(arg0, Piece);\n ptr0 = arg0.ptr;\n arg0.ptr = 0;\n }\n wasm.__wbg_set_square_occupant(this.ptr, ptr0);\n }\n /**\n * Description of whether the square is occupied or an unplayable, i.e. off-lattice square\n */\n get state() {\n const ret = wasm.__wbg_get_square_state(this.ptr);\n return ret >>> 0;\n }\n /**\n * Description of whether the square is occupied or an unplayable, i.e. off-lattice square\n * @param {number} arg0\n */\n set state(arg0) {\n wasm.__wbg_set_square_state(this.ptr, arg0);\n }\n /**\n * Standard constructor function to form square from state and occupant\n * @param {number} state\n * @param {Piece | undefined} occupant\n */\n constructor(state, occupant) {\n let ptr0 = 0;\n if (!isLikeNone(occupant)) {\n _assertClass(occupant, Piece);\n ptr0 = occupant.ptr;\n occupant.ptr = 0;\n }\n const ret = wasm.square_new(state, ptr0);\n return Square.__wrap(ret);\n }\n /**\n * Helper function for a well-formed piece square by team and strength\n * @param {number} team\n * @param {number} strength\n * @returns {Square}\n */\n static pc(team, strength) {\n const ret = wasm.square_pc(team, strength);\n return Square.__wrap(ret);\n }\n /**\n * Helper function for a well-formed empty square\n * @returns {Square}\n */\n static empty() {\n const ret = wasm.square_empty();\n return Square.__wrap(ret);\n }\n /**\n * Helper function for a well-formed unplayable square\n * @returns {Square}\n */\n static unplay() {\n const ret = wasm.square_unplay();\n return Square.__wrap(ret);\n }\n}\n\nexport function __wbindgen_object_drop_ref(arg0) {\n takeObject(arg0);\n};\n\nexport function __wbindgen_string_new(arg0, arg1) {\n const ret = getStringFromWasm0(arg0, arg1);\n return addHeapObject(ret);\n};\n\nexport function __wbg_new_693216e109162396() {\n const ret = new Error();\n return addHeapObject(ret);\n};\n\nexport function __wbg_stack_0ddaca5d1abfb52f(arg0, arg1) {\n const ret = getObject(arg1).stack;\n const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len0;\n getInt32Memory0()[arg0 / 4 + 0] = ptr0;\n};\n\nexport function __wbg_error_09919627ac0992f5(arg0, arg1) {\n try {\n console.error(getStringFromWasm0(arg0, arg1));\n } finally {\n wasm.__wbindgen_free(arg0, arg1);\n }\n};\n\nexport function __wbg_self_86b4b13392c7af56() { return handleError(function () {\n const ret = self.self;\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_crypto_b8c92eaac23d0d80(arg0) {\n const ret = getObject(arg0).crypto;\n return addHeapObject(ret);\n};\n\nexport function __wbg_msCrypto_9ad6677321a08dd8(arg0) {\n const ret = getObject(arg0).msCrypto;\n return addHeapObject(ret);\n};\n\nexport function __wbindgen_is_undefined(arg0) {\n const ret = getObject(arg0) === undefined;\n return ret;\n};\n\nexport function __wbg_require_f5521a5b85ad2542(arg0, arg1, arg2) {\n const ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));\n return addHeapObject(ret);\n};\n\nexport function __wbg_getRandomValues_dd27e6b0652b3236(arg0) {\n const ret = getObject(arg0).getRandomValues;\n return addHeapObject(ret);\n};\n\nexport function __wbg_getRandomValues_e57c9b75ddead065(arg0, arg1) {\n getObject(arg0).getRandomValues(getObject(arg1));\n};\n\nexport function __wbg_randomFillSync_d2ba53160aec6aba(arg0, arg1, arg2) {\n getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));\n};\n\nexport function __wbg_static_accessor_MODULE_452b4680e8614c81() {\n const ret = module;\n return addHeapObject(ret);\n};\n\nexport function __wbg_instanceof_Window_0e6c0f1096d66c3c(arg0) {\n const ret = getObject(arg0) instanceof Window;\n return ret;\n};\n\nexport function __wbg_document_99eddbbc11ec831e(arg0) {\n const ret = getObject(arg0).document;\n return isLikeNone(ret) ? 0 : addHeapObject(ret);\n};\n\nexport function __wbg_getElementById_f83c5de20dc455d6(arg0, arg1, arg2) {\n const ret = getObject(arg0).getElementById(getStringFromWasm0(arg1, arg2));\n return isLikeNone(ret) ? 0 : addHeapObject(ret);\n};\n\nexport function __wbg_error_8ff19d586a987aef(arg0) {\n console.error(getObject(arg0));\n};\n\nexport function __wbg_log_e8ba7b992c7ad0eb(arg0) {\n console.log(getObject(arg0));\n};\n\nexport function __wbg_instanceof_CanvasRenderingContext2d_405495bb0ea92c4f(arg0) {\n const ret = getObject(arg0) instanceof CanvasRenderingContext2D;\n return ret;\n};\n\nexport function __wbg_setstrokeStyle_32540003cbfe210b(arg0, arg1) {\n getObject(arg0).strokeStyle = getObject(arg1);\n};\n\nexport function __wbg_setfillStyle_1d391c4891a6ec4d(arg0, arg1) {\n getObject(arg0).fillStyle = getObject(arg1);\n};\n\nexport function __wbg_setlineWidth_6f1b76036ab98bfc(arg0, arg1) {\n getObject(arg0).lineWidth = arg1;\n};\n\nexport function __wbg_beginPath_e040b5521d41f537(arg0) {\n getObject(arg0).beginPath();\n};\n\nexport function __wbg_fill_b6e37fbbefb55ae0(arg0) {\n getObject(arg0).fill();\n};\n\nexport function __wbg_stroke_63664360a52ce7d1(arg0) {\n getObject(arg0).stroke();\n};\n\nexport function __wbg_arc_85205a36bd04df0a() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {\n getObject(arg0).arc(arg1, arg2, arg3, arg4, arg5);\n}, arguments) };\n\nexport function __wbg_fillRect_59b38b7e6f8d0717(arg0, arg1, arg2, arg3, arg4) {\n getObject(arg0).fillRect(arg1, arg2, arg3, arg4);\n};\n\nexport function __wbg_strokeRect_469c3838c9d01537(arg0, arg1, arg2, arg3, arg4) {\n getObject(arg0).strokeRect(arg1, arg2, arg3, arg4);\n};\n\nexport function __wbg_instanceof_HtmlCanvasElement_b94545433bb4d2ef(arg0) {\n const ret = getObject(arg0) instanceof HTMLCanvasElement;\n return ret;\n};\n\nexport function __wbg_setwidth_654d8adcd4979eed(arg0, arg1) {\n getObject(arg0).width = arg1 >>> 0;\n};\n\nexport function __wbg_setheight_2b662384bfacb65c(arg0, arg1) {\n getObject(arg0).height = arg1 >>> 0;\n};\n\nexport function __wbg_getContext_0c19ba5c037e057f() { return handleError(function (arg0, arg1, arg2) {\n const ret = getObject(arg0).getContext(getStringFromWasm0(arg1, arg2));\n return isLikeNone(ret) ? 0 : addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_newnoargs_e23b458e372830de(arg0, arg1) {\n const ret = new Function(getStringFromWasm0(arg0, arg1));\n return addHeapObject(ret);\n};\n\nexport function __wbg_call_ae78342adc33730a() { return handleError(function (arg0, arg1) {\n const ret = getObject(arg0).call(getObject(arg1));\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_self_99737b4dcdf6f0d8() { return handleError(function () {\n const ret = self.self;\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_window_9b61fbbf3564c4fb() { return handleError(function () {\n const ret = window.window;\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_globalThis_8e275ef40caea3a3() { return handleError(function () {\n const ret = globalThis.globalThis;\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_global_5de1e0f82bddcd27() { return handleError(function () {\n const ret = global.global;\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_buffer_7af23f65f6c64548(arg0) {\n const ret = getObject(arg0).buffer;\n return addHeapObject(ret);\n};\n\nexport function __wbg_new_cc9018bd6f283b6f(arg0) {\n const ret = new Uint8Array(getObject(arg0));\n return addHeapObject(ret);\n};\n\nexport function __wbg_set_f25e869e4565d2a2(arg0, arg1, arg2) {\n getObject(arg0).set(getObject(arg1), arg2 >>> 0);\n};\n\nexport function __wbg_length_0acb1cf9bbaf8519(arg0) {\n const ret = getObject(arg0).length;\n return ret;\n};\n\nexport function __wbg_newwithlength_8f0657faca9f1422(arg0) {\n const ret = new Uint8Array(arg0 >>> 0);\n return addHeapObject(ret);\n};\n\nexport function __wbg_subarray_da527dbd24eafb6b(arg0, arg1, arg2) {\n const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);\n return addHeapObject(ret);\n};\n\nexport function __wbindgen_object_clone_ref(arg0) {\n const ret = getObject(arg0);\n return addHeapObject(ret);\n};\n\nexport function __wbindgen_debug_string(arg0, arg1) {\n const ret = debugString(getObject(arg1));\n const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len0;\n getInt32Memory0()[arg0 / 4 + 0] = ptr0;\n};\n\nexport function __wbindgen_throw(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n};\n\nexport function __wbindgen_memory() {\n const ret = wasm.memory;\n return addHeapObject(ret);\n};\n\n","import { Game, Board, BrdIdx, Painter, Team, init_wasm, Moveable, SquareState, Square } from \"draught\";\n// import { memory } from \"draught/draught_bg.wasm\";\n\n///////////////////\n// CONSTS\n///////////////////\n\nconst CANVAS_WIDTH = 720;\nconst CANVAS_HEIGHT = 720;\n\nvar BOARD_WIDTH = 8;\nvar BOARD_HEIGHT = 8;\n\nvar PIECE_ROWS = 3;\nvar SEARCH_DEPTH = 4;\nvar PERFECT_CHANCE = 0.5;\n\nconst STATUS_TIMEOUT = 3000;\nconst WON_TIMEOUT = 3000;\n\nconst GameState = {\n HUMAN_TURN: {\n THINKING: \"human_turn.thinking\",\n FROM_SELECTED: \"human_turn.from_selected\"\n },\n AI_TURN: \"ai_turn\"\n}\n\n//////////////////\n// GAME STUFF\n//////////////////\n\ninit_wasm();\n\n// let board = new Board(BOARD_WIDTH, BOARD_HEIGHT, Team.Black);\n\nconst statusText = document.getElementById(\"status-p\");\nconst statusAlert = document.getElementById(\"status-d\");\nconst teamText = document.getElementById(\"team-p\");\nconst nodeCountText = document.getElementById(\"node-count\");\nconst winningText = document.getElementById(\"winning-p\");\n\nconst startBtn = document.getElementById(\"startBtn\");\nstartBtn.onclick = start_game;\n\nlet wonTimeout = null;\nlet statusTimeout = null;\nlet setStatus = setStatusAlert;\n\nlet current_state = GameState.HUMAN_TURN.THINKING;\n\nlet game = null;\nlet painter = null;\n\nlet clicks = [];\n\nstart_game();\n\n/////////////////\n// CANVAS\n/////////////////\n\nconst canvas = document.getElementById(\"game-canvas\");\ncanvas.addEventListener(\"click\", (event) => {\n var mousepos = getMousePos(canvas, event);\n // console.log(mousepos);\n var cell = new BrdIdx(\n Math.floor((mousepos.y / canvas.clientHeight) * BOARD_HEIGHT),\n Math.floor((mousepos.x / canvas.clientWidth) * BOARD_WIDTH),\n );\n // console.log(cell);\n process_canvas_click(cell);\n});\n\n////////////////\n// FUNCS\n////////////////\n\nfunction start_game() {\n game = new Game(BOARD_WIDTH, BOARD_HEIGHT, PIECE_ROWS, Team.Black, SEARCH_DEPTH);\n painter = new Painter(CANVAS_WIDTH, CANVAS_HEIGHT, \"game-canvas\");\n game.set_painter(painter);\n game.draw();\n\n clearInterval(wonTimeout);\n updateTeamText();\n updateWinningText();\n clicks = [];\n current_state = GameState.HUMAN_TURN.THINKING;\n}\n\nfunction process_canvas_click(cell_coord) {\n\n switch(current_state) {\n // first click of a move\n case GameState.HUMAN_TURN.THINKING:\n if (game.current_cell_state(cell_coord).state != SquareState.Occupied ) {\n return;\n }\n\n if (game.current_cell_state(cell_coord).occupant.team != game.current_turn() ) {\n return;\n }\n\n // console.log(\"Your turn, first piece picked\");\n\n clicks.push(cell_coord);\n current_state = GameState.HUMAN_TURN.FROM_SELECTED;\n game.set_selected(cell_coord);\n game.draw();\n \n break;\n \n // second click of a move\n case GameState.HUMAN_TURN.FROM_SELECTED:\n\n // second click is different to first, process as move\n // otherwise, will skip straight to clean up (clear selected and clicks) \n if (!clicks[0].eq(cell_coord)) {\n\n if (game.current_cell_state(cell_coord).state != SquareState.Empty ) {\n return;\n }\n \n // console.log(\"Your turn, first piece already picked, picking second\");\n \n clicks.push(cell_coord);\n \n if (clicks.length != 2) {\n setStatus(`Error: wrong number of clicks to process ${clicks.length}`);\n console.error(`Error: wrong number of clicks to process ${clicks.length}`);\n \n return;\n }\n\n let status = game.make_move(clicks[0], clicks[1]);\n\n switch(status) {\n case Moveable.Allowed:\n\n if (aiCheckBox.checked && game.has_won() === undefined) {\n\n let start = performance.now();\n\n game.ai_move();\n\n let end = performance.now();\n\n nodeCountText.innerText = `searched ${game.last_node_count.toLocaleString(\"en-GB\")} possible moves in ${(end - start).toLocaleString()}ms`;\n }\n\n break;\n case Moveable.IllegalTrajectory:\n setStatus(\"You can't move like that!\");\n break;\n case Moveable.JumpingSameTeam:\n setStatus(\"You can't jump your own piece!\");\n break;\n case Moveable.NoJumpablePiece:\n setStatus(\"There's nothing to jump!\");\n break;\n case Moveable.OccupiedDest:\n setStatus(\"There's a piece there!\");\n break;\n case Moveable.OutOfBounds:\n setStatus(\"That square's not on the board! (how have you managed that?)\");\n break;\n case Moveable.UnoccupiedSrc:\n setStatus(\"There's no piece to move!\");\n break;\n case Moveable.Unplayable:\n setStatus(\"That's not a playable square!\");\n break;\n case Moveable.WrongTeamSrc:\n setStatus(\"That's not your piece!\");\n break;\n }\n \n }\n\n game.clear_selected();\n game.draw();\n clicks = [];\n current_state = GameState.HUMAN_TURN.THINKING;\n \n break;\n case GameState.AI_TURN:\n console.log(\"It's the AI's turn!\");\n break;\n }\n\n updateTeamText();\n updateWinningText();\n checkWon();\n}\n\nfunction getMousePos(canvas, evt) {\n var rect = canvas.getBoundingClientRect();\n return {\n x: evt.clientX - rect.left,\n y: evt.clientY - rect.top\n };\n}\n\nfunction setStatusText(txt, hide = true) {\n if(statusTimeout != null) {\n clearInterval(statusTimeout);\n }\n\n statusText.innerText = txt;\n\n if(hide) {\n statusTimeout = setTimeout(() => {\n statusText.innerText = \"\";\n }, STATUS_TIMEOUT);\n }\n}\n\nfunction setStatusAlert(txt, alertType = \"danger\", hide = true) {\n if(statusTimeout != null) {\n clearInterval(statusTimeout);\n }\n\n statusAlert.className = `alert alert-${alertType}`;\n statusAlert.innerText = txt;\n statusAlert.hidden = false;\n\n if(hide) {\n statusTimeout = setTimeout(() => {\n statusAlert.hidden = true;\n }, STATUS_TIMEOUT);\n }\n}\n\nfunction updateTeamText(){\n let team = game.current_turn();\n switch(team) {\n case Team.White:\n teamText.innerText = \"⚪ White ⚪\";\n break;\n case Team.Black:\n teamText.innerText = \"🔴 Black 🔴\";\n break;\n }\n}\n\nfunction updateWinningText(){\n \n switch(game.winning()) {\n case undefined:\n winningText.innerText = \"\";\n break;\n case Team.White:\n winningText.innerText = \"👑 White 👑\";\n break;\n case Team.Black:\n winningText.innerText = \"👑 Black 👑\";\n break;\n }\n}\n\nfunction checkWon() {\n\n switch(game.has_won()) {\n case undefined:\n break;\n case Team.White:\n setStatus(\"You Lost!\");\n wonTimeout = setInterval(() => {\n start_game();\n }, WON_TIMEOUT);\n break;\n case Team.Black:\n setStatus(\"You Won!\", \"success\");\n wonTimeout = setInterval(() => {\n start_game();\n }, WON_TIMEOUT);\n break;\n }\n}\n\n////////////////\n// UI\n////////////////\n\nconst widthBox = document.getElementById(\"width\");\n/**\n * Handler for width input box change, start a new game\n */\nconst onWidth = () => {\n\n BOARD_WIDTH = parseInt(widthBox.value);\n start_game();\n}\nwidthBox.onchange = onWidth;\nwidthBox.value = 8;\n\nconst heightBox = document.getElementById(\"height\");\n/**\n * Handler for height input box change, start a new game\n */\nconst onHeight = () => {\n\n BOARD_HEIGHT = parseInt(heightBox.value);\n pieceRowsBox.max = (BOARD_HEIGHT / 2) - 1;\n start_game();\n}\nheightBox.onchange = onHeight;\nheightBox.value = 8;\n\nconst pieceRowsBox = document.getElementById(\"play_rows\");\n/**\n * Handler for piece rows input box change, start a new game\n */\nconst onPieceRows = () => {\n\n PIECE_ROWS = parseInt(pieceRowsBox.value);\n start_game();\n}\npieceRowsBox.onchange = onPieceRows;\npieceRowsBox.value = 3;\n\nconst aiSearchDepthBox = document.getElementById(\"ai_search_depth\");\n/**\n * Handler for AI search depth input box change, start a new game\n */\nconst onAISearchDepth = () => {\n\n SEARCH_DEPTH = parseInt(aiSearchDepthBox.value);\n game.set_search_depth(SEARCH_DEPTH);\n\n if(SEARCH_DEPTH > 4) {\n setStatus(\"This increases thinking time exponentially, be careful (probably don't go past 6)\", \"warning\");\n }\n}\naiSearchDepthBox.onchange = onAISearchDepth;\naiSearchDepthBox.value = 4;\n\nconst aiCheckBox = document.getElementById(\"ai-checkbox\");\n/**\n * Handler for height input box change, get a new universe of given size\n */\nconst onAICheck = () => {\n \n}\naiCheckBox.onchange = onAICheck;\n// aiCheckBox.checked = true;\n\nconst aiPerfectChance = document.getElementById(\"ai_difficulty\");\n/**\n * Handler for piece rows input box change, start a new game\n */\nconst onPerfectChance = () => {\n\n PERFECT_CHANCE = parseInt(aiPerfectChance.value) / 100;\n game.set_perfect_chance(PERFECT_CHANCE);\n}\naiPerfectChance.onchange = onPerfectChance;\naiPerfectChance.value = 50;"],"names":["heap","Array","fill","undefined","getObject","idx","push","heap_next","length","dropObject","takeObject","ret","cachedTextDecoder","TextDecoder","module","require","ignoreBOM","fatal","decode","cachegetUint8Memory0","getUint8Memory0","buffer","Uint8Array","getStringFromWasm0","ptr","len","subarray","addHeapObject","obj","debugString","val","type","description","name","isArray","debug","i","builtInMatches","exec","toString","call","className","JSON","stringify","_","Error","message","stack","WASM_VECTOR_LEN","cachedTextEncoder","TextEncoder","encodeString","encodeInto","arg","view","buf","encode","set","read","written","passStringToWasm0","malloc","realloc","mem","offset","code","charCodeAt","slice","cachegetInt32Memory0","getInt32Memory0","Int32Array","isLikeNone","x","_assertClass","instance","klass","init_wasm","handleError","f","args","apply","this","e","Object","freeze","Move","Jump","Team","Black","White","SquareState","Man","King","Empty","Occupied","Unplayable","Moveable","Allowed","UnoccupiedSrc","OccupiedDest","OutOfBounds","WrongTeamSrc","IllegalTrajectory","NoJumpablePiece","JumpingSameTeam","Board","static","create","prototype","__destroy_into_raw","free","width","arg0","height","current_turn","cell","Square","__wrap","set_cell","square","ptr0","grid_cell","BrdIdx","cell_index","row","col","cell_idx","board_index","can_move","from","to","ptr1","validate_man_move","from_square_occupant","Piece","ptr2","validate_king_move","jumpee_idx","cells","num_cells","num_pieces","num_player","team","score","cell_state","apply_move","apply_jump","king_row_idx","jumpee","from_occ","constructor","board","piece_rows","eq","other","Game","last_node_count","perfect_chance","current_board_cells","current_board_len","winning","has_won","current_cell_state","set_search_depth","search_depth","set_selected","set_perfect_chance","new_chance","clear_selected","make_move","execute_move","execute_jump","push_new_board","set_current","first_turn","canvas_id","canvas_width","canvas_height","len0","set_painter","value","Painter","draw","ai_move","canvas","set_square_outline","set_outline_width","set_draw_outline","reset_dimensions","validate_board_dim","strength","occupant","state","__wbindgen_object_drop_ref","__wbindgen_string_new","arg1","__wbg_new_693216e109162396","__wbg_stack_0ddaca5d1abfb52f","__wbg_error_09919627ac0992f5","console","error","__wbg_self_86b4b13392c7af56","self","arguments","__wbg_crypto_b8c92eaac23d0d80","crypto","__wbg_msCrypto_9ad6677321a08dd8","msCrypto","__wbindgen_is_undefined","__wbg_require_f5521a5b85ad2542","arg2","__wbg_getRandomValues_dd27e6b0652b3236","getRandomValues","__wbg_getRandomValues_e57c9b75ddead065","__wbg_randomFillSync_d2ba53160aec6aba","randomFillSync","__wbg_static_accessor_MODULE_452b4680e8614c81","__wbg_instanceof_Window_0e6c0f1096d66c3c","Window","__wbg_document_99eddbbc11ec831e","document","__wbg_getElementById_f83c5de20dc455d6","getElementById","__wbg_error_8ff19d586a987aef","__wbg_log_e8ba7b992c7ad0eb","log","__wbg_instanceof_CanvasRenderingContext2d_405495bb0ea92c4f","CanvasRenderingContext2D","__wbg_setstrokeStyle_32540003cbfe210b","strokeStyle","__wbg_setfillStyle_1d391c4891a6ec4d","fillStyle","__wbg_setlineWidth_6f1b76036ab98bfc","lineWidth","__wbg_beginPath_e040b5521d41f537","beginPath","__wbg_fill_b6e37fbbefb55ae0","__wbg_stroke_63664360a52ce7d1","stroke","__wbg_arc_85205a36bd04df0a","arg3","arg4","arg5","arc","__wbg_fillRect_59b38b7e6f8d0717","fillRect","__wbg_strokeRect_469c3838c9d01537","strokeRect","__wbg_instanceof_HtmlCanvasElement_b94545433bb4d2ef","HTMLCanvasElement","__wbg_setwidth_654d8adcd4979eed","__wbg_setheight_2b662384bfacb65c","__wbg_getContext_0c19ba5c037e057f","getContext","__wbg_newnoargs_e23b458e372830de","Function","__wbg_call_ae78342adc33730a","__wbg_self_99737b4dcdf6f0d8","__wbg_window_9b61fbbf3564c4fb","window","__wbg_globalThis_8e275ef40caea3a3","globalThis","__wbg_global_5de1e0f82bddcd27","g","global","__wbg_buffer_7af23f65f6c64548","__wbg_new_cc9018bd6f283b6f","__wbg_set_f25e869e4565d2a2","__wbg_length_0acb1cf9bbaf8519","__wbg_newwithlength_8f0657faca9f1422","__wbg_subarray_da527dbd24eafb6b","__wbindgen_object_clone_ref","__wbindgen_debug_string","__wbindgen_throw","__wbindgen_memory","CANVAS_WIDTH","CANVAS_HEIGHT","BOARD_WIDTH","BOARD_HEIGHT","PIECE_ROWS","SEARCH_DEPTH","PERFECT_CHANCE","STATUS_TIMEOUT","WON_TIMEOUT","GameState","HUMAN_TURN","THINKING","FROM_SELECTED","AI_TURN","statusAlert","teamText","nodeCountText","winningText","onclick","start_game","wonTimeout","statusTimeout","setStatus","setStatusAlert","current_state","game","painter","clicks","clearInterval","updateTeamText","updateWinningText","process_canvas_click","cell_coord","aiCheckBox","checked","start","performance","now","end","innerText","toLocaleString","checkWon","getMousePos","evt","rect","getBoundingClientRect","clientX","left","y","clientY","top","txt","alertType","hide","hidden","setTimeout","setInterval","addEventListener","event","mousepos","Math","floor","clientHeight","clientWidth","widthBox","onWidth","parseInt","onchange","heightBox","onHeight","pieceRowsBox","max","onPieceRows","aiSearchDepthBox","onAISearchDepth","onAICheck","aiPerfectChance","onPerfectChance"],"sourceRoot":""}