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,SAAWK,EACxBF,EAAavK,MAAQ,EAErB,MAAM0K,EAAmBjI,SAASE,eAAe,mBAI3CgI,EAAkB,KAEpBrE,EAAe6D,SAASO,EAAiB1K,OACzC0H,EAAK3I,iBAAiBuH,GAEnBA,EAAe,GACdiB,EAAU,oFAAqF,UACnG,EAEJmD,EAAiBN,SAAWO,EAC5BD,EAAiB1K,MAAQ,EAEzB,MAAMkI,EAAazF,SAASE,eAAe,eAIrCiI,EAAY,OAGlB1C,EAAWkC,SAAWQ,EAGtB,MAAMC,EAAkBpI,SAASE,eAAe,iBAI1CmI,EAAkB,KAEpBvE,EAAiB4D,SAASU,EAAgB7K,OAAS,IACnD0H,EAAKxI,mBAAmBqH,EAAe,EAE3CsE,EAAgBT,SAAWU,EAC3BD,EAAgB7K,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 cachedUint8Memory0 = new Uint8Array();\n\nfunction getUint8Memory0() {\n if (cachedUint8Memory0.byteLength === 0) {\n cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8Memory0;\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 cachedInt32Memory0 = new Int32Array();\n\nfunction getInt32Memory0() {\n if (cachedInt32Memory0.byteLength === 0) {\n cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);\n }\n return cachedInt32Memory0;\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 * @returns {number}\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 * @returns {number}\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 * @returns {number}\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 * @returns {number}\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 * @returns {number}\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 * @returns {number}\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 * @returns {number}\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 * @returns {number}\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 * @returns {number}\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 * @returns {Piece | undefined}\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 * @returns {number}\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_abda76e883ba8a5f() {\n const ret = new Error();\n return addHeapObject(ret);\n};\n\nexport function __wbg_stack_658279fe44541cf6(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_f851667af71bcfc6(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_7eede1f4488bf346() { return handleError(function () {\n const ret = self.self;\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_crypto_c909fb428dcbddb6(arg0) {\n const ret = getObject(arg0).crypto;\n return addHeapObject(ret);\n};\n\nexport function __wbg_msCrypto_511eefefbfc70ae4(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_900d5c3984fe7703(arg0, arg1, arg2) {\n const ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));\n return addHeapObject(ret);\n};\n\nexport function __wbg_getRandomValues_307049345d0bd88c(arg0) {\n const ret = getObject(arg0).getRandomValues;\n return addHeapObject(ret);\n};\n\nexport function __wbg_getRandomValues_cd175915511f705e(arg0, arg1) {\n getObject(arg0).getRandomValues(getObject(arg1));\n};\n\nexport function __wbg_randomFillSync_85b3f4c52c56c313(arg0, arg1, arg2) {\n getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));\n};\n\nexport function __wbg_static_accessor_MODULE_ef3aa2eb251158a5() {\n const ret = module;\n return addHeapObject(ret);\n};\n\nexport function __wbg_instanceof_Window_acc97ff9f5d2c7b4(arg0) {\n let result;\n try {\n result = getObject(arg0) instanceof Window;\n } catch {\n result = false;\n }\n const ret = result;\n return ret;\n};\n\nexport function __wbg_document_3ead31dbcad65886(arg0) {\n const ret = getObject(arg0).document;\n return isLikeNone(ret) ? 0 : addHeapObject(ret);\n};\n\nexport function __wbg_getElementById_3a708b83e4f034d7(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_ef9a0be47931175f(arg0) {\n console.error(getObject(arg0));\n};\n\nexport function __wbg_log_4b5638ad60bdc54a(arg0) {\n console.log(getObject(arg0));\n};\n\nexport function __wbg_instanceof_CanvasRenderingContext2d_ff80c06d296e3622(arg0) {\n let result;\n try {\n result = getObject(arg0) instanceof CanvasRenderingContext2D;\n } catch {\n result = false;\n }\n const ret = result;\n return ret;\n};\n\nexport function __wbg_setstrokeStyle_899ea3720dae323b(arg0, arg1) {\n getObject(arg0).strokeStyle = getObject(arg1);\n};\n\nexport function __wbg_setfillStyle_53ccf2a9886c1c4d(arg0, arg1) {\n getObject(arg0).fillStyle = getObject(arg1);\n};\n\nexport function __wbg_setlineWidth_64004648773fed7a(arg0, arg1) {\n getObject(arg0).lineWidth = arg1;\n};\n\nexport function __wbg_beginPath_4e91b7092d0d33d9(arg0) {\n getObject(arg0).beginPath();\n};\n\nexport function __wbg_fill_8ec436f419a0d161(arg0) {\n getObject(arg0).fill();\n};\n\nexport function __wbg_stroke_85dee7d87c4a6ead(arg0) {\n getObject(arg0).stroke();\n};\n\nexport function __wbg_arc_30e550c408f151ac() { 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_c7a19e13c5242507(arg0, arg1, arg2, arg3, arg4) {\n getObject(arg0).fillRect(arg1, arg2, arg3, arg4);\n};\n\nexport function __wbg_strokeRect_972fbfb664182aea(arg0, arg1, arg2, arg3, arg4) {\n getObject(arg0).strokeRect(arg1, arg2, arg3, arg4);\n};\n\nexport function __wbg_instanceof_HtmlCanvasElement_97761617af6ea089(arg0) {\n let result;\n try {\n result = getObject(arg0) instanceof HTMLCanvasElement;\n } catch {\n result = false;\n }\n const ret = result;\n return ret;\n};\n\nexport function __wbg_setwidth_afb418d3fbf71ba7(arg0, arg1) {\n getObject(arg0).width = arg1 >>> 0;\n};\n\nexport function __wbg_setheight_3eb8729b59493242(arg0, arg1) {\n getObject(arg0).height = arg1 >>> 0;\n};\n\nexport function __wbg_getContext_4d5e97892c1b206a() { 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_b5b063fc6c2f0376(arg0, arg1) {\n const ret = new Function(getStringFromWasm0(arg0, arg1));\n return addHeapObject(ret);\n};\n\nexport function __wbg_call_97ae9d8645dc388b() { return handleError(function (arg0, arg1) {\n const ret = getObject(arg0).call(getObject(arg1));\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_self_6d479506f72c6a71() { return handleError(function () {\n const ret = self.self;\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_window_f2557cc78490aceb() { return handleError(function () {\n const ret = window.window;\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_globalThis_7f206bda628d5286() { return handleError(function () {\n const ret = globalThis.globalThis;\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_global_ba75c50d1cf384f4() { return handleError(function () {\n const ret = global.global;\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_buffer_3f3d764d4747d564(arg0) {\n const ret = getObject(arg0).buffer;\n return addHeapObject(ret);\n};\n\nexport function __wbg_new_8c3f0052272a457a(arg0) {\n const ret = new Uint8Array(getObject(arg0));\n return addHeapObject(ret);\n};\n\nexport function __wbg_set_83db9690f9353e79(arg0, arg1, arg2) {\n getObject(arg0).set(getObject(arg1), arg2 >>> 0);\n};\n\nexport function __wbg_length_9e1ae1900cb0fbd5(arg0) {\n const ret = getObject(arg0).length;\n return ret;\n};\n\nexport function __wbg_newwithlength_f5933855e4f48a19(arg0) {\n const ret = new Uint8Array(arg0 >>> 0);\n return addHeapObject(ret);\n};\n\nexport function __wbg_subarray_58ad4efbb5bcb886(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","cachedUint8Memory0","Uint8Array","getUint8Memory0","byteLength","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","cachedInt32Memory0","Int32Array","getInt32Memory0","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_abda76e883ba8a5f","__wbg_stack_658279fe44541cf6","__wbg_error_f851667af71bcfc6","console","error","__wbg_self_7eede1f4488bf346","self","arguments","__wbg_crypto_c909fb428dcbddb6","crypto","__wbg_msCrypto_511eefefbfc70ae4","msCrypto","__wbindgen_is_undefined","__wbg_require_900d5c3984fe7703","arg2","__wbg_getRandomValues_307049345d0bd88c","getRandomValues","__wbg_getRandomValues_cd175915511f705e","__wbg_randomFillSync_85b3f4c52c56c313","randomFillSync","__wbg_static_accessor_MODULE_ef3aa2eb251158a5","__wbg_instanceof_Window_acc97ff9f5d2c7b4","result","Window","__wbg_document_3ead31dbcad65886","document","__wbg_getElementById_3a708b83e4f034d7","getElementById","__wbg_error_ef9a0be47931175f","__wbg_log_4b5638ad60bdc54a","log","__wbg_instanceof_CanvasRenderingContext2d_ff80c06d296e3622","CanvasRenderingContext2D","__wbg_setstrokeStyle_899ea3720dae323b","strokeStyle","__wbg_setfillStyle_53ccf2a9886c1c4d","fillStyle","__wbg_setlineWidth_64004648773fed7a","lineWidth","__wbg_beginPath_4e91b7092d0d33d9","beginPath","__wbg_fill_8ec436f419a0d161","__wbg_stroke_85dee7d87c4a6ead","stroke","__wbg_arc_30e550c408f151ac","arg3","arg4","arg5","arc","__wbg_fillRect_c7a19e13c5242507","fillRect","__wbg_strokeRect_972fbfb664182aea","strokeRect","__wbg_instanceof_HtmlCanvasElement_97761617af6ea089","HTMLCanvasElement","__wbg_setwidth_afb418d3fbf71ba7","__wbg_setheight_3eb8729b59493242","__wbg_getContext_4d5e97892c1b206a","getContext","__wbg_newnoargs_b5b063fc6c2f0376","Function","__wbg_call_97ae9d8645dc388b","__wbg_self_6d479506f72c6a71","__wbg_window_f2557cc78490aceb","window","__wbg_globalThis_7f206bda628d5286","globalThis","__wbg_global_ba75c50d1cf384f4","g","global","__wbg_buffer_3f3d764d4747d564","buffer","__wbg_new_8c3f0052272a457a","__wbg_set_83db9690f9353e79","__wbg_length_9e1ae1900cb0fbd5","__wbg_newwithlength_f5933855e4f48a19","__wbg_subarray_58ad4efbb5bcb886","__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":""} |