4D tic-tac-toe (real)
No files matched your search
|
After Width: | Height: | Size: 1.6 MiB |
@@ -21,7 +21,7 @@ const metricDisplayInfo = {
|
||||
commentsPosted: { name: "Comments posted", units: "comment" },
|
||||
greatestInfipage: { name: "Largest infipage visited" },
|
||||
heavpootLocations: { name: "Heavpoot's Game states", units: "state" },
|
||||
heavpootDeaths: { name: "Heavpoot's Game deaths", units: "death" }
|
||||
heavpootDeaths: { name: "Heavpoot's Game deaths", units: "death" },
|
||||
}
|
||||
|
||||
for (const opponent of ["ai1", "ai2"]) {
|
||||
@@ -30,6 +30,10 @@ for (const opponent of ["ai1", "ai2"]) {
|
||||
}
|
||||
}
|
||||
|
||||
for (const result of ["Wins", "Losses", "Draws"]) {
|
||||
metricDisplayInfo[`ttt4${result}`] = { name: `${result} in 4D Tic-Tac-Toe`, units: "game" }
|
||||
}
|
||||
|
||||
const displayMetric = metric => {
|
||||
let name = metric[0]
|
||||
let value = metric[1]
|
||||
|
||||
@@ -360,6 +360,8 @@ slug: tictactoe
|
||||
function render() {
|
||||
var html = ""
|
||||
for (var l = 0; l < size; l++) {
|
||||
if (l == 2) html += `</div>`
|
||||
if (l == 0 || l == 2) html += `<div class="ctr">`
|
||||
html += '<div class="layer">'
|
||||
for (var r = 0; r < size; r++) {
|
||||
html += '<div class="row">'
|
||||
@@ -373,6 +375,7 @@ slug: tictactoe
|
||||
}
|
||||
html += '</div>'
|
||||
}
|
||||
if (l == 3) html += `</div>`
|
||||
html += '</div>'
|
||||
}
|
||||
screen.innerHTML = html
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
.layer{margin:1em;border:1px solid #666;display:inline-block}.cell{display:flex;flex-direction:column}.slot{width:2rem;height:2rem;display:inline-block;border:1px solid #aaa;font-size:.5em}.slot-1{background:#00f}.slot-2{background:red}.board,.row{display:flex}.highlight{width:50%;height:50%;top:25%;left:25%;position:relative}.abspos-indicator{height:100%;background-size:cover}
|
||||
/*# sourceMappingURL=app.css.map */
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../app.css"],
|
||||
"sourcesContent": [".layer {\n margin: 1em;\n border: 1px solid #666;\n display: inline-block;\n}\n.cell {\n display: flex;\n flex-direction: column;\n}\n.slot {\n width: 2rem;\n height: 2rem;\n display: inline-block;\n border: 1px solid #aaa;\n font-size: 0.5em;\n}\n.slot-1 {\n background: blue;\n}\n.slot-2 {\n background: red;\n}\n.board {\n display: flex;\n}\n.row {\n display: flex;\n}\n.highlight {\n width: 50%;\n height: 50%;\n top: 25%;\n left: 25%;\n position: relative;\n}\n.abspos-indicator {\n height: 100%;\n background-size: cover;\n}"],
|
||||
"mappings": "AAAA,CAAC,MAAD,OACY,IACR,OAAQ,IAAI,MAAM,KAClB,QAAS,YACb,CACA,CAAC,KACG,QAAS,KACT,eAAgB,MACpB,CACA,CAAC,KACG,MAAO,KACP,OAAQ,KACR,QAAS,aACT,OAAQ,IAAI,MAAM,KAClB,UAAW,IACf,CACA,CAAC,OACG,WAAY,IAChB,CACA,CAAC,OACG,WAAY,GAChB,CACA,CAAC,MAGD,CAAC,IAFG,QAAS,IACb,CAIA,CAAC,UACG,MAAO,IACP,OAAQ,IACR,IAAK,IACL,KAAM,IACN,SAAU,QACd,CACA,CAAC,iBACG,OAAQ,KACR,gBAAiB,KACrB",
|
||||
"names": []
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
(()=>{var a,w=new Array(128).fill(void 0);w.push(void 0,null,!0,!1);function c(n){return w[n]}var E=w.length;function L(n){n<132||(w[n]=E,E=n)}function M(n){let e=c(n);return L(n),e}function _(n){E===w.length&&w.push(w.length+1);let e=E;return E=w[e],w[e]=n,e}var T=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&T.decode();var p=null;function m(){return(p===null||p.byteLength===0)&&(p=new Uint8Array(a.memory.buffer)),p}function s(n,e){return n=n>>>0,T.decode(m().subarray(n,n+e))}function g(n){return n==null}var k=null;function R(){return(k===null||k.byteLength===0)&&(k=new Float64Array(a.memory.buffer)),k}var A=null;function l(){return(A===null||A.byteLength===0)&&(A=new Int32Array(a.memory.buffer)),A}function W(n){let e=typeof n;if(e=="number"||e=="boolean"||n==null)return`${n}`;if(e=="string")return`"${n}"`;if(e=="symbol"){let o=n.description;return o==null?"Symbol":`Symbol(${o})`}if(e=="function"){let o=n.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(n)){let o=n.length,i="[";o>0&&(i+=W(n[0]));for(let u=1;u<o;u++)i+=", "+W(n[u]);return i+="]",i}let t=/\[object ([^\]]+)\]/.exec(toString.call(n)),r;if(t.length>1)r=t[1];else return toString.call(n);if(r=="Object")try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message}
|
||||
${n.stack}`:r}var d=0,v=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},U=typeof v.encodeInto=="function"?function(n,e){return v.encodeInto(n,e)}:function(n,e){let t=v.encode(n);return e.set(t),{read:n.length,written:t.length}};function h(n,e,t){if(t===void 0){let f=v.encode(n),y=e(f.length,1)>>>0;return m().subarray(y,y+f.length).set(f),d=f.length,y}let r=n.length,o=e(r,1)>>>0,i=m(),u=0;for(;u<r;u++){let f=n.charCodeAt(u);if(f>127)break;i[o+u]=f}if(u!==r){u!==0&&(n=n.slice(u)),o=t(o,r,r=u+n.length*3,1)>>>0;let f=m().subarray(o+u,o+r),y=U(n,f);u+=y.written}return d=u,o}function C(n,e,t,r){let o={a:n,b:e,cnt:1,dtor:t},i=(...u)=>{o.cnt++;let f=o.a;o.a=0;try{return r(f,o.b,...u)}finally{--o.cnt===0?a.__wbindgen_export_2.get(o.dtor)(f,o.b):o.a=f}};return i.original=o,i}function F(n,e){let t=e(n.length*1,1)>>>0;return m().set(n,t/1),d=n.length,t}function B(n,e,t){let r=F(t,a.__wbindgen_malloc),o=d;a.wasm_bindgen__convert__closures__invoke1_mut__h5860e381bcb9706c(n,e,r,o)}function D(n,e,t,r){let o={a:n,b:e,cnt:1,dtor:t},i=(...u)=>{o.cnt++;try{return r(o.a,o.b,...u)}finally{--o.cnt===0&&(a.__wbindgen_export_2.get(o.dtor)(o.a,o.b),o.a=0)}};return i.original=o,i}function N(n,e,t){a.wasm_bindgen__convert__closures__invoke1__h5a4fa13f3ec138ca(n,e,_(t))}function $(n,e){return n=n>>>0,m().subarray(n/1,n/1+e)}function V(n){return()=>{throw new Error(`${n} is not defined`)}}function S(){let n=a.main();return M(n)}var x=null;function z(){return(x===null||x.byteLength===0)&&(x=new Uint32Array(a.memory.buffer)),x}function q(n,e){n=n>>>0;let r=z().subarray(n/4,n/4+e),o=[];for(let i=0;i<r.length;i++)o.push(M(r[i]));return o}function b(n,e){try{return n.apply(this,e)}catch(t){a.__wbindgen_exn_store(_(t))}}async function J(n,e){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,e)}catch(r){if(n.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}let t=await n.arrayBuffer();return await WebAssembly.instantiate(t,e)}else{let t=await WebAssembly.instantiate(n,e);return t instanceof WebAssembly.Instance?{instance:t,module:n}:t}}function H(){let n={};return n.wbg={},n.wbg.__wbindgen_object_drop_ref=function(e){M(e)},n.wbg.__wbindgen_object_clone_ref=function(e){let t=c(e);return _(t)},n.wbg.__wbg_wincallback_a6a4fc5b782108cf=typeof win_callback=="function"?win_callback:V("win_callback"),n.wbg.__wbg_runaibackground_8f0429c82a23ffaf=function(e,t){var r=$(e,t).slice();a.__wbindgen_free(e,t*1,1),run_ai_background(r)},n.wbg.__wbindgen_string_new=function(e,t){let r=s(e,t);return _(r)},n.wbg.__wbindgen_number_get=function(e,t){let r=c(t),o=typeof r=="number"?r:void 0;R()[e/8+1]=g(o)?0:o,l()[e/4+0]=!g(o)},n.wbg.__wbindgen_number_new=function(e){return _(e)},n.wbg.__wbg_new_abda76e883ba8a5f=function(){let e=new Error;return _(e)},n.wbg.__wbg_stack_658279fe44541cf6=function(e,t){let r=c(t).stack,o=h(r,a.__wbindgen_malloc,a.__wbindgen_realloc),i=d;l()[e/4+1]=i,l()[e/4+0]=o},n.wbg.__wbg_error_f851667af71bcfc6=function(e,t){let r,o;try{r=e,o=t,console.error(s(e,t))}finally{a.__wbindgen_free(r,o,1)}},n.wbg.__wbg_warn_40349716c899750a=function(e,t){var r=q(e,t).slice();a.__wbindgen_free(e,t*4,4),console.warn(...r)},n.wbg.__wbg_instanceof_Window_434ce1849eb4e0fc=function(e){let t;try{t=c(e)instanceof Window}catch{t=!1}return t},n.wbg.__wbg_body_4579ae140279af20=function(e){let t=c(e).body;return g(t)?0:_(t)},n.wbg.__wbg_createElement_d15f046703844f09=function(){return b(function(e,t,r){let o=c(e).createElement(s(t,r));return _(o)},arguments)},n.wbg.__wbg_createElementNS_11acf9c78d336078=function(){return b(function(e,t,r,o,i){let u=c(e).createElementNS(t===0?void 0:s(t,r),s(o,i));return _(u)},arguments)},n.wbg.__wbg_createTextNode_18d067bf6369a475=function(e,t,r){let o=c(e).createTextNode(s(t,r));return _(o)},n.wbg.__wbg_getElementById_af8feeb3fb877150=function(e,t,r){let o=c(e).getElementById(s(t,r));return g(o)?0:_(o)},n.wbg.__wbg_instanceof_Element_c9423704dd5d9b1d=function(e){let t;try{t=c(e)instanceof Element}catch{t=!1}return t},n.wbg.__wbg_namespaceURI_9fd9462aeda0a089=function(e,t){let r=c(t).namespaceURI;var o=g(r)?0:h(r,a.__wbindgen_malloc,a.__wbindgen_realloc),i=d;l()[e/4+1]=i,l()[e/4+0]=o},n.wbg.__wbg_removeAttribute_8f442821de341f11=function(){return b(function(e,t,r){c(e).removeAttribute(s(t,r))},arguments)},n.wbg.__wbg_setAttribute_fecb2c0d020f422f=function(){return b(function(e,t,r,o,i){c(e).setAttribute(s(t,r),s(o,i))},arguments)},n.wbg.__wbg_target_ee132da05a9ef949=function(e){let t=c(e).target;return g(t)?0:_(t)},n.wbg.__wbg_cancelBubble_5739e699df6294b0=function(e){return c(e).cancelBubble},n.wbg.__wbg_addEventListener_1151978b9ef85f25=function(){
Line truncated
|
||||
//# sourceMappingURL=app.js.map
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../pkg/tic_tac_toe_4d.js", "../src/app.js"],
|
||||
"sourcesContent": ["let wasm;\n\nconst heap = new Array(128).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 < 132) 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\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\nconst cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );\n\nif (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };\n\nlet cachedUint8Memory0 = null;\n\nfunction getUint8Memory0() {\n if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {\n cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8Memory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));\n}\n\nfunction isLikeNone(x) {\n return x === undefined || x === null;\n}\n\nlet cachedFloat64Memory0 = null;\n\nfunction getFloat64Memory0() {\n if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {\n cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);\n }\n return cachedFloat64Memory0;\n}\n\nlet cachedInt32Memory0 = null;\n\nfunction getInt32Memory0() {\n if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {\n cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);\n }\n return cachedInt32Memory0;\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 cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );\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, 1) >>> 0;\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, 1) >>> 0;\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 iLine truncated
|
||||
"mappings": "MAAA,IAAIA,EAEEC,EAAO,IAAI,MAAM,GAAG,EAAE,KAAK,MAAS,EAE1CA,EAAK,KAAK,OAAW,KAAM,GAAM,EAAK,EAEtC,SAASC,EAAUC,EAAK,CAAE,OAAOF,EAAKE,CAAG,CAAG,CAE5C,IAAIC,EAAYH,EAAK,OAErB,SAASI,EAAWF,EAAK,CACjBA,EAAM,MACVF,EAAKE,CAAG,EAAIC,EACZA,EAAYD,EAChB,CAEA,SAASG,EAAWH,EAAK,CACrB,IAAMI,EAAML,EAAUC,CAAG,EACzB,OAAAE,EAAWF,CAAG,EACPI,CACX,CAEA,SAASC,EAAcC,EAAK,CACpBL,IAAcH,EAAK,QAAQA,EAAK,KAAKA,EAAK,OAAS,CAAC,EACxD,IAAME,EAAMC,EACZ,OAAAA,EAAYH,EAAKE,CAAG,EAEpBF,EAAKE,CAAG,EAAIM,EACLN,CACX,CAEA,IAAMO,EAAqB,OAAO,YAAgB,IAAc,IAAI,YAAY,QAAS,CAAE,UAAW,GAAM,MAAO,EAAK,CAAC,EAAI,CAAE,OAAQ,IAAM,CAAE,MAAM,MAAM,2BAA2B,CAAE,CAAE,EAEtL,OAAO,YAAgB,KA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C,OAAOC,CACX,CAEA,SAASC,EAAYC,EAAGC,EAAM,CAC1B,GAAI,CACA,OAAOD,EAAE,MAAM,KAAMC,CAAI,CAC7B,OAASC,EAAG,CACRZ,EAAK,qBAAqBa,EAAcD,CAAC,CAAC,CAC9CLine truncated
|
||||
"names": ["wasm", "heap", "getObject", "idx", "heap_next", "dropObject", "takeObject", "ret", "addHeapObject", "obj", "cachedTextDecoder", "cachedUint8Memory0", "getUint8Memory0", "getStringFromWasm0", "ptr", "len", "isLikeNone", "x", "cachedFloat64Memory0", "getFloat64Memory0", "cachedInt32Memory0", "getInt32Memory0", "debugString", "val", "type", "description", "name", "length", "debug", "i", "builtInMatches", "className", "WASM_VECTOR_LEN", "cachedTextEncoder", "encodeString", "arg", "view", "buf", "passStringToWasm0", "malloc", "realloc", "mem", "offset", "code", "makeMutClosure", "arg0", "arg1", "dtor", "f", "state", "real", "args", "a", "passArray8ToWasm0", "__wbg_adapter_18", "arg2", "ptr0", "len0", "makeClosure", "__wbg_adapter_21", "getArrayU8FromWasm0", "notDefined", "what", "main", "ret", "wasm", "takeObject", "cachedUint32Memory0", "getUint32Memory0", "getArrayJsValueFromWasm0", "ptr", "len", "slice", "result", "handleError", "f", "args", "e", "addHeapObject", "__wbg_load", "module", "imports", "bytes", "instance", "__wbg_get_imports", "arg0", "getObject", "arg1", "v0", "getArrayU8FromWasm0", "getStringFromWasm0", "obj", "getFloat64Memory0", "isLikeNone", "getInt32Memory0", "ptr1", "passStringToWasm0", "len1", "WASM_VECTOR_LEN", "deferred0_0", "deferred0_1", "arg2", "arg3", "arg4", "debugString", "makeMutClosure", "__wbg_adapter_18", "makeClosure", "__wbg_adapter_21", "__wbg_finalize_init", "instance", "module", "wasm", "__wbg_init", "cachedFloat64Memory0", "cachedInt32Memory0", "cachedUint32Memory0", "cachedUint8Memory0", "__wbg_init", "input", "wasm", "imports", "__wbg_get_imports", "instance", "module", "__wbg_load", "__wbg_finalize_init", "tic_tac_toe_4d_default", "__wbg_init", "worker", "winner", "points", "x", "tic_tac_toe_4d_default", "callback", "main", "data", "ev"]
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
<svg version="1.1" width="100" height="100" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="25%" width="12.5%" height="100%" fill="rgb(0 0 0 / 10%)" />
|
||||
<rect x="75%" width="12.5%" height="100%" fill="rgb(0 0 0 / 10%)" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 232 B |
@@ -0,0 +1,4 @@
|
||||
<svg version="1.1" width="100" height="100" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="25%" width="25%" height="100%" fill="rgb(0 0 0 / 10%)" />
|
||||
<rect x="75%" width="25%" height="100%" fill="rgb(0 0 0 / 10%)" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 228 B |
@@ -0,0 +1,4 @@
|
||||
<svg version="1.1" width="100" height="100" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="25%" height="100%" fill="rgb(0 0 0 / 10%)" />
|
||||
<rect x="50%" width="25%" height="100%" fill="rgb(0 0 0 / 10%)" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 220 B |
@@ -0,0 +1,4 @@
|
||||
<svg version="1.1" width="100" height="100" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="37.5%" height="100%" fill="rgb(0 0 0 / 10%)" />
|
||||
<rect x="50%" width="37.5%" height="100%" fill="rgb(0 0 0 / 10%)" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 224 B |
@@ -0,0 +1,4 @@
|
||||
<svg version="1.1" width="100" height="100" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect y="25%" height="12.5%" width="100%" fill="rgb(0 0 0 / 10%)" />
|
||||
<rect y="75%" height="12.5%" width="100%" fill="rgb(0 0 0 / 10%)" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 232 B |
@@ -0,0 +1,4 @@
|
||||
<svg version="1.1" width="100" height="100" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect y="25%" height="25%" width="100%" fill="rgb(0 0 0 / 10%)" />
|
||||
<rect y="75%" height="25%" width="100%" fill="rgb(0 0 0 / 10%)" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 228 B |
@@ -0,0 +1,4 @@
|
||||
<svg version="1.1" width="100" height="100" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect height="25%" width="100%" fill="rgb(0 0 0 / 10%)" />
|
||||
<rect y="50%" height="25%" width="100%" fill="rgb(0 0 0 / 10%)" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 220 B |
@@ -0,0 +1,4 @@
|
||||
<svg version="1.1" width="100" height="100" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect height="37.5%" width="100%" fill="rgb(0 0 0 / 10%)" />
|
||||
<rect y="50%" height="37.5%" width="100%" fill="rgb(0 0 0 / 10%)" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 224 B |
@@ -0,0 +1,2 @@
|
||||
.layer{margin:1em;border:1px solid #666;display:inline-block}.cell{display:flex;flex-direction:column}.slot{width:2rem;height:2rem;display:inline-block;border:1px solid #aaa;font-size:.5em}.slot-1{background:#00f}.slot-2{background:red}.board,.row{display:flex}.highlight{width:50%;height:50%;top:25%;left:25%;position:relative}.abspos-indicator{height:100%;background-size:cover}
|
||||
/*# sourceMappingURL=app.css.map */
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../app.css"],
|
||||
"sourcesContent": [".layer {\n margin: 1em;\n border: 1px solid #666;\n display: inline-block;\n}\n.cell {\n display: flex;\n flex-direction: column;\n}\n.slot {\n width: 2rem;\n height: 2rem;\n display: inline-block;\n border: 1px solid #aaa;\n font-size: 0.5em;\n}\n.slot-1 {\n background: blue;\n}\n.slot-2 {\n background: red;\n}\n.board {\n display: flex;\n}\n.row {\n display: flex;\n}\n.highlight {\n width: 50%;\n height: 50%;\n top: 25%;\n left: 25%;\n position: relative;\n}\n.abspos-indicator {\n height: 100%;\n background-size: cover;\n}"],
|
||||
"mappings": "AAAA,CAAC,MAAD,OACY,IACR,OAAQ,IAAI,MAAM,KAClB,QAAS,YACb,CACA,CAAC,KACG,QAAS,KACT,eAAgB,MACpB,CACA,CAAC,KACG,MAAO,KACP,OAAQ,KACR,QAAS,aACT,OAAQ,IAAI,MAAM,KAClB,UAAW,IACf,CACA,CAAC,OACG,WAAY,IAChB,CACA,CAAC,OACG,WAAY,GAChB,CACA,CAAC,MAGD,CAAC,IAFG,QAAS,IACb,CAIA,CAAC,UACG,MAAO,IACP,OAAQ,IACR,IAAK,IACL,KAAM,IACN,SAAU,QACd,CACA,CAAC,iBACG,OAAQ,KACR,gBAAiB,KACrB",
|
||||
"names": []
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
(()=>{var a,w=new Array(128).fill(void 0);w.push(void 0,null,!0,!1);function c(n){return w[n]}var v=w.length;function R(n){n<132||(w[n]=v,v=n)}function T(n){let e=c(n);return R(n),e}function _(n){v===w.length&&w.push(w.length+1);let e=v;return v=w[e],w[e]=n,e}var S=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&S.decode();var k=null;function m(){return(k===null||k.byteLength===0)&&(k=new Uint8Array(a.memory.buffer)),k}function s(n,e){return n=n>>>0,S.decode(m().subarray(n,n+e))}function g(n){return n==null}var A=null;function U(){return(A===null||A.byteLength===0)&&(A=new Float64Array(a.memory.buffer)),A}var x=null;function l(){return(x===null||x.byteLength===0)&&(x=new Int32Array(a.memory.buffer)),x}function M(n){let e=typeof n;if(e=="number"||e=="boolean"||n==null)return`${n}`;if(e=="string")return`"${n}"`;if(e=="symbol"){let o=n.description;return o==null?"Symbol":`Symbol(${o})`}if(e=="function"){let o=n.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(n)){let o=n.length,i="[";o>0&&(i+=M(n[0]));for(let u=1;u<o;u++)i+=", "+M(n[u]);return i+="]",i}let t=/\[object ([^\]]+)\]/.exec(toString.call(n)),r;if(t.length>1)r=t[1];else return toString.call(n);if(r=="Object")try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message}
|
||||
${n.stack}`:r}var d=0,W=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},C=typeof W.encodeInto=="function"?function(n,e){return W.encodeInto(n,e)}:function(n,e){let t=W.encode(n);return e.set(t),{read:n.length,written:t.length}};function p(n,e,t){if(t===void 0){let f=W.encode(n),h=e(f.length,1)>>>0;return m().subarray(h,h+f.length).set(f),d=f.length,h}let r=n.length,o=e(r,1)>>>0,i=m(),u=0;for(;u<r;u++){let f=n.charCodeAt(u);if(f>127)break;i[o+u]=f}if(u!==r){u!==0&&(n=n.slice(u)),o=t(o,r,r=u+n.length*3,1)>>>0;let f=m().subarray(o+u,o+r),h=C(n,f);u+=h.written}return d=u,o}function F(n,e,t,r){let o={a:n,b:e,cnt:1,dtor:t},i=(...u)=>{o.cnt++;let f=o.a;o.a=0;try{return r(f,o.b,...u)}finally{--o.cnt===0?a.__wbindgen_export_2.get(o.dtor)(f,o.b):o.a=f}};return i.original=o,i}function B(n,e){let t=e(n.length*1,1)>>>0;return m().set(n,t/1),d=n.length,t}function D(n,e,t){let r=B(t,a.__wbindgen_malloc),o=d;a.wasm_bindgen__convert__closures__invoke1_mut__h5860e381bcb9706c(n,e,r,o)}function N(n,e,t,r){let o={a:n,b:e,cnt:1,dtor:t},i=(...u)=>{o.cnt++;try{return r(o.a,o.b,...u)}finally{--o.cnt===0&&(a.__wbindgen_export_2.get(o.dtor)(o.a,o.b),o.a=0)}};return i.original=o,i}function $(n,e,t){a.wasm_bindgen__convert__closures__invoke1__h5a4fa13f3ec138ca(n,e,_(t))}function V(n,e){return n=n>>>0,m().subarray(n/1,n/1+e)}function z(n){return()=>{throw new Error(`${n} is not defined`)}}function O(){let n=a.main();return T(n)}var E=null;function q(){return(E===null||E.byteLength===0)&&(E=new Uint32Array(a.memory.buffer)),E}function J(n,e){n=n>>>0;let r=q().subarray(n/4,n/4+e),o=[];for(let i=0;i<r.length;i++)o.push(T(r[i]));return o}function b(n,e){try{return n.apply(this,e)}catch(t){a.__wbindgen_exn_store(_(t))}}async function H(n,e){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,e)}catch(r){if(n.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}let t=await n.arrayBuffer();return await WebAssembly.instantiate(t,e)}else{let t=await WebAssembly.instantiate(n,e);return t instanceof WebAssembly.Instance?{instance:t,module:n}:t}}function G(){let n={};return n.wbg={},n.wbg.__wbindgen_object_drop_ref=function(e){T(e)},n.wbg.__wbindgen_object_clone_ref=function(e){let t=c(e);return _(t)},n.wbg.__wbg_wincallback_a6a4fc5b782108cf=typeof win_callback=="function"?win_callback:z("win_callback"),n.wbg.__wbg_runaibackground_8f0429c82a23ffaf=function(e,t){var r=V(e,t).slice();a.__wbindgen_free(e,t*1,1),run_ai_background(r)},n.wbg.__wbindgen_string_new=function(e,t){let r=s(e,t);return _(r)},n.wbg.__wbindgen_number_get=function(e,t){let r=c(t),o=typeof r=="number"?r:void 0;U()[e/8+1]=g(o)?0:o,l()[e/4+0]=!g(o)},n.wbg.__wbindgen_number_new=function(e){return _(e)},n.wbg.__wbg_new_abda76e883ba8a5f=function(){let e=new Error;return _(e)},n.wbg.__wbg_stack_658279fe44541cf6=function(e,t){let r=c(t).stack,o=p(r,a.__wbindgen_malloc,a.__wbindgen_realloc),i=d;l()[e/4+1]=i,l()[e/4+0]=o},n.wbg.__wbg_error_f851667af71bcfc6=function(e,t){let r,o;try{r=e,o=t,console.error(s(e,t))}finally{a.__wbindgen_free(r,o,1)}},n.wbg.__wbg_warn_40349716c899750a=function(e,t){var r=J(e,t).slice();a.__wbindgen_free(e,t*4,4),console.warn(...r)},n.wbg.__wbg_instanceof_Window_434ce1849eb4e0fc=function(e){let t;try{t=c(e)instanceof Window}catch{t=!1}return t},n.wbg.__wbg_body_4579ae140279af20=function(e){let t=c(e).body;return g(t)?0:_(t)},n.wbg.__wbg_createElement_d15f046703844f09=function(){return b(function(e,t,r){let o=c(e).createElement(s(t,r));return _(o)},arguments)},n.wbg.__wbg_createElementNS_11acf9c78d336078=function(){return b(function(e,t,r,o,i){let u=c(e).createElementNS(t===0?void 0:s(t,r),s(o,i));return _(u)},arguments)},n.wbg.__wbg_createTextNode_18d067bf6369a475=function(e,t,r){let o=c(e).createTextNode(s(t,r));return _(o)},n.wbg.__wbg_getElementById_af8feeb3fb877150=function(e,t,r){let o=c(e).getElementById(s(t,r));return g(o)?0:_(o)},n.wbg.__wbg_instanceof_Element_c9423704dd5d9b1d=function(e){let t;try{t=c(e)instanceof Element}catch{t=!1}return t},n.wbg.__wbg_namespaceURI_9fd9462aeda0a089=function(e,t){let r=c(t).namespaceURI;var o=g(r)?0:p(r,a.__wbindgen_malloc,a.__wbindgen_realloc),i=d;l()[e/4+1]=i,l()[e/4+0]=o},n.wbg.__wbg_removeAttribute_8f442821de341f11=function(){return b(function(e,t,r){c(e).removeAttribute(s(t,r))},arguments)},n.wbg.__wbg_setAttribute_fecb2c0d020f422f=function(){return b(function(e,t,r,o,i){c(e).setAttribute(s(t,r),s(o,i))},arguments)},n.wbg.__wbg_target_ee132da05a9ef949=function(e){let t=c(e).target;return g(t)?0:_(t)},n.wbg.__wbg_cancelBubble_5739e699df6294b0=function(e){return c(e).cancelBubble},n.wbg.__wbg_addEventListener_1151978b9ef85f25=function(){
Line truncated
|
||||
//# sourceMappingURL=app.js.map
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../pkg/tic_tac_toe_4d.js", "../src/app.js"],
|
||||
"sourcesContent": ["let wasm;\n\nconst heap = new Array(128).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 < 132) 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\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\nconst cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );\n\nif (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };\n\nlet cachedUint8Memory0 = null;\n\nfunction getUint8Memory0() {\n if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {\n cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8Memory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));\n}\n\nfunction isLikeNone(x) {\n return x === undefined || x === null;\n}\n\nlet cachedFloat64Memory0 = null;\n\nfunction getFloat64Memory0() {\n if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {\n cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);\n }\n return cachedFloat64Memory0;\n}\n\nlet cachedInt32Memory0 = null;\n\nfunction getInt32Memory0() {\n if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {\n cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);\n }\n return cachedInt32Memory0;\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 cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );\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, 1) >>> 0;\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, 1) >>> 0;\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 iLine truncated
|
||||
"mappings": "MAAA,IAAIA,EAEEC,EAAO,IAAI,MAAM,GAAG,EAAE,KAAK,MAAS,EAE1CA,EAAK,KAAK,OAAW,KAAM,GAAM,EAAK,EAEtC,SAASC,EAAUC,EAAK,CAAE,OAAOF,EAAKE,CAAG,CAAG,CAE5C,IAAIC,EAAYH,EAAK,OAErB,SAASI,EAAWF,EAAK,CACjBA,EAAM,MACVF,EAAKE,CAAG,EAAIC,EACZA,EAAYD,EAChB,CAEA,SAASG,EAAWH,EAAK,CACrB,IAAMI,EAAML,EAAUC,CAAG,EACzB,OAAAE,EAAWF,CAAG,EACPI,CACX,CAEA,SAASC,EAAcC,EAAK,CACpBL,IAAcH,EAAK,QAAQA,EAAK,KAAKA,EAAK,OAAS,CAAC,EACxD,IAAME,EAAMC,EACZ,OAAAA,EAAYH,EAAKE,CAAG,EAEpBF,EAAKE,CAAG,EAAIM,EACLN,CACX,CAEA,IAAMO,EAAqB,OAAO,YAAgB,IAAc,IAAI,YAAY,QAAS,CAAE,UAAW,GAAM,MAAO,EAAK,CAAC,EAAI,CAAE,OAAQ,IAAM,CAAE,MAAM,MAAM,2BAA2B,CAAE,CAAE,EAEtL,OAAO,YAAgB,KAAeA,EAAkB,OAAO,EAEnE,IAAIC,EAAqB,KAEzB,SAASC,GAAkB,CACvB,OAAID,IAAuB,MAAQA,EAAmB,aAAe,KACjEA,EAAqB,IAAI,WAAWX,EAAK,OAAO,MAAM,GAEnDW,CACX,CAEA,SAASE,EAAmBC,EAAKC,EAAK,CAClC,OAAAD,EAAMA,IAAQ,EACPJ,EAAkB,OAAOE,EAAgB,EAAE,SAASE,EAAKA,EAAMC,CAAG,CAAC,CAC9E,CAEA,SAASC,EAAWC,EAAG,CACnB,OAA0BA,GAAM,IACpC,CAEA,IAAIC,EAAuB,KAE3B,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EAGlB,CACJ,EACA,OAAAC,EAAK,SAAWD,EAETC,CACX,CACA,SAASS,EAAiBd,EAAMC,EAAMS,EAAM,CACxCvD,EAAK,4DAA4D6C,EAAMC,EAAMtC,EAAc+C,CAAI,CAAC,CACpG,CAEA,SAASK,EAAoB9C,EAAKC,EAAK,CACnC,OAAAD,EAAMA,IAAQ,EACPF,EAAgB,EAAE,SAASE,EAAM,EAAGA,EAAM,EAAIC,CAAG,CAC5D,CAqBA,SAAS8C,EAAWC,EAAM,CAAE,MAAO,IAAM,CAAE,MAAM,IAAI,MAAM,GAAGA,CAAI,iBAAiB,CAAG,CAAG,CAIlF,SAASC,GAAO,CACnB,IAAMC,EAAMC,EAAK,KAAK,EACtB,OAAOC,EAAWF,CAAG,CACzB,CAEA,IAAIG,EAAsB,KAE1B,SAASC,GAAmB,CACxB,OAAID,IAAwB,MAAQA,EAAoB,aAAe,KACnEA,EAAsB,IAAI,YAAYF,EAAK,OAAO,MAAM,GAErDE,CACX,CAEA,SAASE,EAAyBC,EAAKC,EAAK,CACxCD,EAAMA,IAAQ,EAEd,IAAME,EADMJ,EAAiB,EACX,SAASE,EAAM,EAAGA,EAAM,EAAIC,CAAG,EAC3CE,EAAS,CAAC,EAChB,QAAS,EAAI,EAAG,EAAID,EAAM,OAAQ,IAC9BC,EAAO,KAAKP,EAAWM,EAAM,CAAC,CAAC,CAAC,EAEpC,OAAOC,CACX,CAEA,SAASC,EAAYC,EAAGC,EAAM,CAC1B,GAAI,CACA,OAAOD,EAAE,MAAM,KAAMC,CAAI,CAC7B,OAASC,EAAG,CACRZ,EAAK,qBAAqBa,EAAcD,CAAC,CAAC,CAC9CLine truncated
|
||||
"names": ["wasm", "heap", "getObject", "idx", "heap_next", "dropObject", "takeObject", "ret", "addHeapObject", "obj", "cachedTextDecoder", "cachedUint8Memory0", "getUint8Memory0", "getStringFromWasm0", "ptr", "len", "isLikeNone", "x", "cachedFloat64Memory0", "getFloat64Memory0", "cachedInt32Memory0", "getInt32Memory0", "debugString", "val", "type", "description", "name", "length", "debug", "i", "builtInMatches", "className", "WASM_VECTOR_LEN", "cachedTextEncoder", "encodeString", "arg", "view", "buf", "passStringToWasm0", "malloc", "realloc", "mem", "offset", "code", "makeMutClosure", "arg0", "arg1", "dtor", "f", "state", "real", "args", "a", "passArray8ToWasm0", "__wbg_adapter_18", "arg2", "ptr0", "len0", "makeClosure", "__wbg_adapter_21", "getArrayU8FromWasm0", "notDefined", "what", "main", "ret", "wasm", "takeObject", "cachedUint32Memory0", "getUint32Memory0", "getArrayJsValueFromWasm0", "ptr", "len", "slice", "result", "handleError", "f", "args", "e", "addHeapObject", "__wbg_load", "module", "imports", "bytes", "instance", "__wbg_get_imports", "arg0", "getObject", "arg1", "v0", "getArrayU8FromWasm0", "getStringFromWasm0", "obj", "getFloat64Memory0", "isLikeNone", "getInt32Memory0", "ptr1", "passStringToWasm0", "len1", "WASM_VECTOR_LEN", "deferred0_0", "deferred0_1", "arg2", "arg3", "arg4", "debugString", "makeMutClosure", "__wbg_adapter_18", "makeClosure", "__wbg_adapter_21", "__wbg_finalize_init", "instance", "module", "wasm", "__wbg_init", "cachedFloat64Memory0", "cachedInt32Memory0", "cachedUint32Memory0", "cachedUint8Memory0", "__wbg_init", "input", "wasm", "imports", "__wbg_get_imports", "instance", "module", "__wbg_load", "__wbg_finalize_init", "tic_tac_toe_4d_default", "__wbg_init", "worker", "achievementSystem", "winner", "x", "tic_tac_toe_4d_default", "callback", "main", "data", "ev"]
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
<svg version="1.1" width="100" height="100" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="25%" width="12.5%" height="100%" fill="rgb(0 0 0 / 10%)" />
|
||||
<rect x="75%" width="12.5%" height="100%" fill="rgb(0 0 0 / 10%)" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 232 B |
@@ -0,0 +1,4 @@
|
||||
<svg version="1.1" width="100" height="100" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="25%" width="25%" height="100%" fill="rgb(0 0 0 / 10%)" />
|
||||
<rect x="75%" width="25%" height="100%" fill="rgb(0 0 0 / 10%)" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 228 B |
@@ -0,0 +1,4 @@
|
||||
<svg version="1.1" width="100" height="100" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="25%" height="100%" fill="rgb(0 0 0 / 10%)" />
|
||||
<rect x="50%" width="25%" height="100%" fill="rgb(0 0 0 / 10%)" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 220 B |
@@ -0,0 +1,4 @@
|
||||
<svg version="1.1" width="100" height="100" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="37.5%" height="100%" fill="rgb(0 0 0 / 10%)" />
|
||||
<rect x="50%" width="37.5%" height="100%" fill="rgb(0 0 0 / 10%)" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 224 B |
@@ -0,0 +1,4 @@
|
||||
<svg version="1.1" width="100" height="100" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect y="25%" height="12.5%" width="100%" fill="rgb(0 0 0 / 10%)" />
|
||||
<rect y="75%" height="12.5%" width="100%" fill="rgb(0 0 0 / 10%)" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 232 B |
@@ -0,0 +1,4 @@
|
||||
<svg version="1.1" width="100" height="100" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect y="25%" height="25%" width="100%" fill="rgb(0 0 0 / 10%)" />
|
||||
<rect y="75%" height="25%" width="100%" fill="rgb(0 0 0 / 10%)" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 228 B |
@@ -0,0 +1,4 @@
|
||||
<svg version="1.1" width="100" height="100" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect height="25%" width="100%" fill="rgb(0 0 0 / 10%)" />
|
||||
<rect y="50%" height="25%" width="100%" fill="rgb(0 0 0 / 10%)" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 220 B |
@@ -0,0 +1,4 @@
|
||||
<svg version="1.1" width="100" height="100" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect height="37.5%" width="100%" fill="rgb(0 0 0 / 10%)" />
|
||||
<rect y="50%" height="37.5%" width="100%" fill="rgb(0 0 0 / 10%)" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 224 B |
@@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>4D Tic-Tac-Toe</title>
|
||||
<link rel="stylesheet" href="app.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script src="app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,41 @@
|
||||
/* app.css */
|
||||
.layer {
|
||||
margin: 1em;
|
||||
border: 1px solid #666;
|
||||
display: inline-block;
|
||||
}
|
||||
.cell {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.slot {
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
display: inline-block;
|
||||
border: 1px solid #aaa;
|
||||
font-size: 0.5em;
|
||||
}
|
||||
.slot-1 {
|
||||
background: blue;
|
||||
}
|
||||
.slot-2 {
|
||||
background: red;
|
||||
}
|
||||
.board {
|
||||
display: flex;
|
||||
}
|
||||
.row {
|
||||
display: flex;
|
||||
}
|
||||
.highlight {
|
||||
width: 50%;
|
||||
height: 50%;
|
||||
top: 25%;
|
||||
left: 25%;
|
||||
position: relative;
|
||||
}
|
||||
.abspos-indicator {
|
||||
height: 100%;
|
||||
background-size: cover;
|
||||
}
|
||||
/*# sourceMappingURL=webworker_glue.css.map */
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../app.css"],
|
||||
"sourcesContent": [".layer {\n margin: 1em;\n border: 1px solid #666;\n display: inline-block;\n}\n.cell {\n display: flex;\n flex-direction: column;\n}\n.slot {\n width: 2rem;\n height: 2rem;\n display: inline-block;\n border: 1px solid #aaa;\n font-size: 0.5em;\n}\n.slot-1 {\n background: blue;\n}\n.slot-2 {\n background: red;\n}\n.board {\n display: flex;\n}\n.row {\n display: flex;\n}\n.highlight {\n width: 50%;\n height: 50%;\n top: 25%;\n left: 25%;\n position: relative;\n}\n.abspos-indicator {\n height: 100%;\n background-size: cover;\n}"],
|
||||
"mappings": ";AAAA,CAAC;AACG,UAAQ;AACR,UAAQ,IAAI,MAAM;AAClB,WAAS;AACb;AACA,CAAC;AACG,WAAS;AACT,kBAAgB;AACpB;AACA,CAAC;AACG,SAAO;AACP,UAAQ;AACR,WAAS;AACT,UAAQ,IAAI,MAAM;AAClB,aAAW;AACf;AACA,CAAC;AACG,cAAY;AAChB;AACA,CAAC;AACG,cAAY;AAChB;AACA,CAAC;AACG,WAAS;AACb;AACA,CAAC;AACG,WAAS;AACb;AACA,CAAC;AACG,SAAO;AACP,UAAQ;AACR,OAAK;AACL,QAAM;AACN,YAAU;AACd;AACA,CAAC;AACG,UAAQ;AACR,mBAAiB;AACrB;",
|
||||
"names": []
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
(()=>{var i,d=new Array(128).fill(void 0);d.push(void 0,null,!0,!1);function c(n){return d[n]}var x=d.length;function U(n){n<132||(d[n]=x,x=n)}function W(n){let e=c(n);return U(n),e}function u(n){x===d.length&&d.push(d.length+1);let e=x;return x=d[e],d[e]=n,e}var M=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&M.decode();var p=null;function m(){return(p===null||p.byteLength===0)&&(p=new Uint8Array(i.memory.buffer)),p}function b(n,e){return n=n>>>0,M.decode(m().subarray(n,n+e))}function w(n){return n==null}var A=null;function C(){return(A===null||A.byteLength===0)&&(A=new Float64Array(i.memory.buffer)),A}var E=null;function l(){return(E===null||E.byteLength===0)&&(E=new Int32Array(i.memory.buffer)),E}function T(n){let e=typeof n;if(e=="number"||e=="boolean"||n==null)return`${n}`;if(e=="string")return`"${n}"`;if(e=="symbol"){let o=n.description;return o==null?"Symbol":`Symbol(${o})`}if(e=="function"){let o=n.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(n)){let o=n.length,_="[";o>0&&(_+=T(n[0]));for(let a=1;a<o;a++)_+=", "+T(n[a]);return _+="]",_}let t=/\[object ([^\]]+)\]/.exec(toString.call(n)),r;if(t.length>1)r=t[1];else return toString.call(n);if(r=="Object")try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message}
|
||||
${n.stack}`:r}var g=0,v=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},F=typeof v.encodeInto=="function"?function(n,e){return v.encodeInto(n,e)}:function(n,e){let t=v.encode(n);return e.set(t),{read:n.length,written:t.length}};function h(n,e,t){if(t===void 0){let s=v.encode(n),y=e(s.length,1)>>>0;return m().subarray(y,y+s.length).set(s),g=s.length,y}let r=n.length,o=e(r,1)>>>0,_=m(),a=0;for(;a<r;a++){let s=n.charCodeAt(a);if(s>127)break;_[o+a]=s}if(a!==r){a!==0&&(n=n.slice(a)),o=t(o,r,r=a+n.length*3,1)>>>0;let s=m().subarray(o+a,o+r),y=F(n,s);a+=y.written}return g=a,o}function L(n,e,t,r){let o={a:n,b:e,cnt:1,dtor:t},_=(...a)=>{o.cnt++;let s=o.a;o.a=0;try{return r(s,o.b,...a)}finally{--o.cnt===0?i.__wbindgen_export_2.get(o.dtor)(s,o.b):o.a=s}};return _.original=o,_}function S(n,e){let t=e(n.length*1,1)>>>0;return m().set(n,t/1),g=n.length,t}function B(n,e,t){let r=S(t,i.__wbindgen_malloc),o=g;i.wasm_bindgen__convert__closures__invoke1_mut__h5860e381bcb9706c(n,e,r,o)}function N(n,e,t,r){let o={a:n,b:e,cnt:1,dtor:t},_=(...a)=>{o.cnt++;try{return r(o.a,o.b,...a)}finally{--o.cnt===0&&(i.__wbindgen_export_2.get(o.dtor)(o.a,o.b),o.a=0)}};return _.original=o,_}function $(n,e,t){i.wasm_bindgen__convert__closures__invoke1__h5a4fa13f3ec138ca(n,e,u(t))}function O(n,e){return n=n>>>0,m().subarray(n/1,n/1+e)}function j(n){try{let o=i.__wbindgen_add_to_stack_pointer(-16),_=S(n,i.__wbindgen_malloc),a=g;i.run_ai(o,_,a);var e=l()[o/4+0],t=l()[o/4+1],r=O(e,t).slice();return i.__wbindgen_free(e,t*1,1),r}finally{i.__wbindgen_add_to_stack_pointer(16)}}function D(n){return()=>{throw new Error(`${n} is not defined`)}}var k=null;function V(){return(k===null||k.byteLength===0)&&(k=new Uint32Array(i.memory.buffer)),k}function q(n,e){n=n>>>0;let r=V().subarray(n/4,n/4+e),o=[];for(let _=0;_<r.length;_++)o.push(W(r[_]));return o}function f(n,e){try{return n.apply(this,e)}catch(t){i.__wbindgen_exn_store(u(t))}}async function J(n,e){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,e)}catch(r){if(n.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}let t=await n.arrayBuffer();return await WebAssembly.instantiate(t,e)}else{let t=await WebAssembly.instantiate(n,e);return t instanceof WebAssembly.Instance?{instance:t,module:n}:t}}function z(){let n={};return n.wbg={},n.wbg.__wbindgen_object_drop_ref=function(e){W(e)},n.wbg.__wbindgen_object_clone_ref=function(e){let t=c(e);return u(t)},n.wbg.__wbg_wincallback_a6a4fc5b782108cf=typeof win_callback=="function"?win_callback:D("win_callback"),n.wbg.__wbg_runaibackground_8f0429c82a23ffaf=function(e,t){var r=O(e,t).slice();i.__wbindgen_free(e,t*1,1),run_ai_background(r)},n.wbg.__wbindgen_string_new=function(e,t){let r=b(e,t);return u(r)},n.wbg.__wbindgen_number_get=function(e,t){let r=c(t),o=typeof r=="number"?r:void 0;C()[e/8+1]=w(o)?0:o,l()[e/4+0]=!w(o)},n.wbg.__wbindgen_number_new=function(e){return u(e)},n.wbg.__wbg_new_abda76e883ba8a5f=function(){let e=new Error;return u(e)},n.wbg.__wbg_stack_658279fe44541cf6=function(e,t){let r=c(t).stack,o=h(r,i.__wbindgen_malloc,i.__wbindgen_realloc),_=g;l()[e/4+1]=_,l()[e/4+0]=o},n.wbg.__wbg_error_f851667af71bcfc6=function(e,t){let r,o;try{r=e,o=t,console.error(b(e,t))}finally{i.__wbindgen_free(r,o,1)}},n.wbg.__wbg_warn_40349716c899750a=function(e,t){var r=q(e,t).slice();i.__wbindgen_free(e,t*4,4),console.warn(...r)},n.wbg.__wbg_instanceof_Window_434ce1849eb4e0fc=function(e){let t;try{t=c(e)instanceof Window}catch{t=!1}return t},n.wbg.__wbg_body_4579ae140279af20=function(e){let t=c(e).body;return w(t)?0:u(t)},n.wbg.__wbg_createElement_d15f046703844f09=function(){return f(function(e,t,r){let o=c(e).createElement(b(t,r));return u(o)},arguments)},n.wbg.__wbg_createElementNS_11acf9c78d336078=function(){return f(function(e,t,r,o,_){let a=c(e).createElementNS(t===0?void 0:b(t,r),b(o,_));return u(a)},arguments)},n.wbg.__wbg_createTextNode_18d067bf6369a475=function(e,t,r){let o=c(e).createTextNode(b(t,r));return u(o)},n.wbg.__wbg_getElementById_af8feeb3fb877150=function(e,t,r){let o=c(e).getElementById(b(t,r));return w(o)?0:u(o)},n.wbg.__wbg_instanceof_Element_c9423704dd5d9b1d=function(e){let t;try{t=c(e)instanceof Element}catch{t=!1}return t},n.wbg.__wbg_namespaceURI_9fd9462aeda0a089=function(e,t){let r=c(t).namespaceURI;var o=w(r)?0:h(r,i.__wbindgen_malloc,i.__wbindgen_realloc),_=g;l()[e/4+1]=_,l()[e/4+0]=o},n.wbg.__wbg_removeAttribute_8f442821de341f11=function(){return f(function(e,t,r){c(e).removeAttribute(b(t,r))},arguments)},n.wbg.__wbg_setAttribute_fecb2c0d020f422f=function(){return f(function(e,t,r,o,_){c(e).setAttribute(b(t,r),b(o,_))},arguments)},n.wbg.__wbg_target_ee13
Line truncated
|
||||
//# sourceMappingURL=webworker_glue.js.map
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../pkg/tic_tac_toe_4d.js", "../src/webworker_glue.js"],
|
||||
"sourcesContent": ["let wasm;\n\nconst heap = new Array(128).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 < 132) 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\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\nconst cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );\n\nif (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };\n\nlet cachedUint8Memory0 = null;\n\nfunction getUint8Memory0() {\n if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {\n cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8Memory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));\n}\n\nfunction isLikeNone(x) {\n return x === undefined || x === null;\n}\n\nlet cachedFloat64Memory0 = null;\n\nfunction getFloat64Memory0() {\n if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {\n cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);\n }\n return cachedFloat64Memory0;\n}\n\nlet cachedInt32Memory0 = null;\n\nfunction getInt32Memory0() {\n if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {\n cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);\n }\n return cachedInt32Memory0;\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 cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );\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, 1) >>> 0;\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, 1) >>> 0;\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 iLine truncated
|
||||
"mappings": "MAAA,IAAIA,EAEEC,EAAO,IAAI,MAAM,GAAG,EAAE,KAAK,MAAS,EAE1CA,EAAK,KAAK,OAAW,KAAM,GAAM,EAAK,EAEtC,SAASC,EAAUC,EAAK,CAAE,OAAOF,EAAKE,CAAG,CAAG,CAE5C,IAAIC,EAAYH,EAAK,OAErB,SAASI,EAAWF,EAAK,CACjBA,EAAM,MACVF,EAAKE,CAAG,EAAIC,EACZA,EAAYD,EAChB,CAEA,SAASG,EAAWH,EAAK,CACrB,IAAMI,EAAML,EAAUC,CAAG,EACzB,OAAAE,EAAWF,CAAG,EACPI,CACX,CAEA,SAASC,EAAcC,EAAK,CACpBL,IAAcH,EAAK,QAAQA,EAAK,KAAKA,EAAK,OAAS,CAAC,EACxD,IAAME,EAAMC,EACZ,OAAAA,EAAYH,EAAKE,CAAG,EAEpBF,EAAKE,CAAG,EAAIM,EACLN,CACX,CAEA,IAAMO,EAAqB,OAAO,YAAgB,IAAc,IAAI,YAAY,QAAS,CAAE,UAAW,GAAM,MAAO,EAAK,CAAC,EAAI,CAAE,OAAQ,IAAM,CAAE,MAAM,MAAM,2BAA2B,CAAE,CAAE,EAEtL,OAAO,YAAgB,KAAeA,EAAkB,OAAO,EAEnE,IAAIC,EAAqB,KAEzB,SAASC,GAAkB,CACvB,OAAID,IAAuB,MAAQA,EAAmB,aAAe,KACjEA,EAAqB,IAAI,WAAWX,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,CAEA,SAASG,EAAyBC,EAAKC,EAAK,CACxCDLine truncated
|
||||
"names": ["wasm", "heap", "getObject", "idx", "heap_next", "dropObject", "takeObject", "ret", "addHeapObject", "obj", "cachedTextDecoder", "cachedUint8Memory0", "getUint8Memory0", "getStringFromWasm0", "ptr", "len", "isLikeNone", "x", "cachedFloat64Memory0", "getFloat64Memory0", "cachedInt32Memory0", "getInt32Memory0", "debugString", "val", "type", "description", "name", "length", "debug", "i", "builtInMatches", "className", "WASM_VECTOR_LEN", "cachedTextEncoder", "encodeString", "arg", "view", "buf", "passStringToWasm0", "malloc", "realloc", "mem", "offset", "code", "makeMutClosure", "arg0", "arg1", "dtor", "f", "state", "real", "args", "a", "passArray8ToWasm0", "__wbg_adapter_18", "arg2", "ptr0", "len0", "makeClosure", "__wbg_adapter_21", "getArrayU8FromWasm0", "run_ai", "retptr", "r0", "r1", "v2", "notDefined", "what", "cachedUint32Memory0", "getUint32Memory0", "wasm", "getArrayJsValueFromWasm0", "ptr", "len", "slice", "result", "i", "takeObject", "handleError", "f", "args", "e", "addHeapObject", "__wbg_load", "module", "imports", "bytes", "instance", "__wbg_get_imports", "arg0", "ret", "getObject", "notDefined", "arg1", "v0", "getArrayU8FromWasm0", "getStringFromWasm0", "obj", "getFloat64Memory0", "isLikeNone", "getInt32Memory0", "ptr1", "passStringToWasm0", "len1", "WASM_VECTOR_LEN", "deferred0_0", "deferred0_1", "arg2", "arg3", "arg4", "debugString", "makeMutClosure", "__wbg_adapter_18", "makeClosure", "__wbg_adapter_21", "__wbg_finalize_init", "instance", "module", "wasm", "__wbg_init", "cachedFloat64Memory0", "cachedInt32Memory0", "cachedUint32Memory0", "cachedUint8Memory0", "__wbg_init", "input", "wasm", "imports", "__wbg_get_imports", "instance", "module", "__wbg_load", "__wbg_finalize_init", "tic_tac_toe_4d_default", "__wbg_init", "tic_tac_toe_4d_default", "x", "event", "run_ai"]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
title: Tic-Tac-Toe (4⁴)
|
||||
description: More dimensions. More confusion. Somewhat worse performance. 4D Tic-Tac-Toe.
|
||||
slug: tictactoe4
|
||||
---
|
||||
<link rel="stylesheet" href="app.css">
|
||||
<div id="app"></div>
|
||||
<script src="app.js"></script>
|
||||
@@ -0,0 +1,41 @@
|
||||
/* app.css */
|
||||
.layer {
|
||||
margin: 1em;
|
||||
border: 1px solid #666;
|
||||
display: inline-block;
|
||||
}
|
||||
.cell {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.slot {
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
display: inline-block;
|
||||
border: 1px solid #aaa;
|
||||
font-size: 0.5em;
|
||||
}
|
||||
.slot-1 {
|
||||
background: blue;
|
||||
}
|
||||
.slot-2 {
|
||||
background: red;
|
||||
}
|
||||
.board {
|
||||
display: flex;
|
||||
}
|
||||
.row {
|
||||
display: flex;
|
||||
}
|
||||
.highlight {
|
||||
width: 50%;
|
||||
height: 50%;
|
||||
top: 25%;
|
||||
left: 25%;
|
||||
position: relative;
|
||||
}
|
||||
.abspos-indicator {
|
||||
height: 100%;
|
||||
background-size: cover;
|
||||
}
|
||||
/*# sourceMappingURL=webworker_glue.css.map */
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../app.css"],
|
||||
"sourcesContent": [".layer {\n margin: 1em;\n border: 1px solid #666;\n display: inline-block;\n}\n.cell {\n display: flex;\n flex-direction: column;\n}\n.slot {\n width: 2rem;\n height: 2rem;\n display: inline-block;\n border: 1px solid #aaa;\n font-size: 0.5em;\n}\n.slot-1 {\n background: blue;\n}\n.slot-2 {\n background: red;\n}\n.board {\n display: flex;\n}\n.row {\n display: flex;\n}\n.highlight {\n width: 50%;\n height: 50%;\n top: 25%;\n left: 25%;\n position: relative;\n}\n.abspos-indicator {\n height: 100%;\n background-size: cover;\n}"],
|
||||
"mappings": ";AAAA,CAAC;AACG,UAAQ;AACR,UAAQ,IAAI,MAAM;AAClB,WAAS;AACb;AACA,CAAC;AACG,WAAS;AACT,kBAAgB;AACpB;AACA,CAAC;AACG,SAAO;AACP,UAAQ;AACR,WAAS;AACT,UAAQ,IAAI,MAAM;AAClB,aAAW;AACf;AACA,CAAC;AACG,cAAY;AAChB;AACA,CAAC;AACG,cAAY;AAChB;AACA,CAAC;AACG,WAAS;AACb;AACA,CAAC;AACG,WAAS;AACb;AACA,CAAC;AACG,SAAO;AACP,UAAQ;AACR,OAAK;AACL,QAAM;AACN,YAAU;AACd;AACA,CAAC;AACG,UAAQ;AACR,mBAAiB;AACrB;",
|
||||
"names": []
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
(()=>{var i,d=new Array(128).fill(void 0);d.push(void 0,null,!0,!1);function c(n){return d[n]}var x=d.length;function U(n){n<132||(d[n]=x,x=n)}function W(n){let e=c(n);return U(n),e}function u(n){x===d.length&&d.push(d.length+1);let e=x;return x=d[e],d[e]=n,e}var M=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&M.decode();var p=null;function m(){return(p===null||p.byteLength===0)&&(p=new Uint8Array(i.memory.buffer)),p}function b(n,e){return n=n>>>0,M.decode(m().subarray(n,n+e))}function w(n){return n==null}var A=null;function C(){return(A===null||A.byteLength===0)&&(A=new Float64Array(i.memory.buffer)),A}var E=null;function l(){return(E===null||E.byteLength===0)&&(E=new Int32Array(i.memory.buffer)),E}function T(n){let e=typeof n;if(e=="number"||e=="boolean"||n==null)return`${n}`;if(e=="string")return`"${n}"`;if(e=="symbol"){let o=n.description;return o==null?"Symbol":`Symbol(${o})`}if(e=="function"){let o=n.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(n)){let o=n.length,_="[";o>0&&(_+=T(n[0]));for(let a=1;a<o;a++)_+=", "+T(n[a]);return _+="]",_}let t=/\[object ([^\]]+)\]/.exec(toString.call(n)),r;if(t.length>1)r=t[1];else return toString.call(n);if(r=="Object")try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message}
|
||||
${n.stack}`:r}var g=0,v=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},F=typeof v.encodeInto=="function"?function(n,e){return v.encodeInto(n,e)}:function(n,e){let t=v.encode(n);return e.set(t),{read:n.length,written:t.length}};function h(n,e,t){if(t===void 0){let s=v.encode(n),y=e(s.length,1)>>>0;return m().subarray(y,y+s.length).set(s),g=s.length,y}let r=n.length,o=e(r,1)>>>0,_=m(),a=0;for(;a<r;a++){let s=n.charCodeAt(a);if(s>127)break;_[o+a]=s}if(a!==r){a!==0&&(n=n.slice(a)),o=t(o,r,r=a+n.length*3,1)>>>0;let s=m().subarray(o+a,o+r),y=F(n,s);a+=y.written}return g=a,o}function L(n,e,t,r){let o={a:n,b:e,cnt:1,dtor:t},_=(...a)=>{o.cnt++;let s=o.a;o.a=0;try{return r(s,o.b,...a)}finally{--o.cnt===0?i.__wbindgen_export_2.get(o.dtor)(s,o.b):o.a=s}};return _.original=o,_}function S(n,e){let t=e(n.length*1,1)>>>0;return m().set(n,t/1),g=n.length,t}function B(n,e,t){let r=S(t,i.__wbindgen_malloc),o=g;i.wasm_bindgen__convert__closures__invoke1_mut__h5860e381bcb9706c(n,e,r,o)}function N(n,e,t,r){let o={a:n,b:e,cnt:1,dtor:t},_=(...a)=>{o.cnt++;try{return r(o.a,o.b,...a)}finally{--o.cnt===0&&(i.__wbindgen_export_2.get(o.dtor)(o.a,o.b),o.a=0)}};return _.original=o,_}function $(n,e,t){i.wasm_bindgen__convert__closures__invoke1__h5a4fa13f3ec138ca(n,e,u(t))}function O(n,e){return n=n>>>0,m().subarray(n/1,n/1+e)}function j(n){try{let o=i.__wbindgen_add_to_stack_pointer(-16),_=S(n,i.__wbindgen_malloc),a=g;i.run_ai(o,_,a);var e=l()[o/4+0],t=l()[o/4+1],r=O(e,t).slice();return i.__wbindgen_free(e,t*1,1),r}finally{i.__wbindgen_add_to_stack_pointer(16)}}function D(n){return()=>{throw new Error(`${n} is not defined`)}}var k=null;function V(){return(k===null||k.byteLength===0)&&(k=new Uint32Array(i.memory.buffer)),k}function q(n,e){n=n>>>0;let r=V().subarray(n/4,n/4+e),o=[];for(let _=0;_<r.length;_++)o.push(W(r[_]));return o}function f(n,e){try{return n.apply(this,e)}catch(t){i.__wbindgen_exn_store(u(t))}}async function J(n,e){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,e)}catch(r){if(n.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}let t=await n.arrayBuffer();return await WebAssembly.instantiate(t,e)}else{let t=await WebAssembly.instantiate(n,e);return t instanceof WebAssembly.Instance?{instance:t,module:n}:t}}function z(){let n={};return n.wbg={},n.wbg.__wbindgen_object_drop_ref=function(e){W(e)},n.wbg.__wbindgen_object_clone_ref=function(e){let t=c(e);return u(t)},n.wbg.__wbg_wincallback_a6a4fc5b782108cf=typeof win_callback=="function"?win_callback:D("win_callback"),n.wbg.__wbg_runaibackground_8f0429c82a23ffaf=function(e,t){var r=O(e,t).slice();i.__wbindgen_free(e,t*1,1),run_ai_background(r)},n.wbg.__wbindgen_string_new=function(e,t){let r=b(e,t);return u(r)},n.wbg.__wbindgen_number_get=function(e,t){let r=c(t),o=typeof r=="number"?r:void 0;C()[e/8+1]=w(o)?0:o,l()[e/4+0]=!w(o)},n.wbg.__wbindgen_number_new=function(e){return u(e)},n.wbg.__wbg_new_abda76e883ba8a5f=function(){let e=new Error;return u(e)},n.wbg.__wbg_stack_658279fe44541cf6=function(e,t){let r=c(t).stack,o=h(r,i.__wbindgen_malloc,i.__wbindgen_realloc),_=g;l()[e/4+1]=_,l()[e/4+0]=o},n.wbg.__wbg_error_f851667af71bcfc6=function(e,t){let r,o;try{r=e,o=t,console.error(b(e,t))}finally{i.__wbindgen_free(r,o,1)}},n.wbg.__wbg_warn_40349716c899750a=function(e,t){var r=q(e,t).slice();i.__wbindgen_free(e,t*4,4),console.warn(...r)},n.wbg.__wbg_instanceof_Window_434ce1849eb4e0fc=function(e){let t;try{t=c(e)instanceof Window}catch{t=!1}return t},n.wbg.__wbg_body_4579ae140279af20=function(e){let t=c(e).body;return w(t)?0:u(t)},n.wbg.__wbg_createElement_d15f046703844f09=function(){return f(function(e,t,r){let o=c(e).createElement(b(t,r));return u(o)},arguments)},n.wbg.__wbg_createElementNS_11acf9c78d336078=function(){return f(function(e,t,r,o,_){let a=c(e).createElementNS(t===0?void 0:b(t,r),b(o,_));return u(a)},arguments)},n.wbg.__wbg_createTextNode_18d067bf6369a475=function(e,t,r){let o=c(e).createTextNode(b(t,r));return u(o)},n.wbg.__wbg_getElementById_af8feeb3fb877150=function(e,t,r){let o=c(e).getElementById(b(t,r));return w(o)?0:u(o)},n.wbg.__wbg_instanceof_Element_c9423704dd5d9b1d=function(e){let t;try{t=c(e)instanceof Element}catch{t=!1}return t},n.wbg.__wbg_namespaceURI_9fd9462aeda0a089=function(e,t){let r=c(t).namespaceURI;var o=w(r)?0:h(r,i.__wbindgen_malloc,i.__wbindgen_realloc),_=g;l()[e/4+1]=_,l()[e/4+0]=o},n.wbg.__wbg_removeAttribute_8f442821de341f11=function(){return f(function(e,t,r){c(e).removeAttribute(b(t,r))},arguments)},n.wbg.__wbg_setAttribute_fecb2c0d020f422f=function(){return f(function(e,t,r,o,_){c(e).setAttribute(b(t,r),b(o,_))},arguments)},n.wbg.__wbg_target_ee13
Line truncated
|
||||
//# sourceMappingURL=webworker_glue.js.map
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../pkg/tic_tac_toe_4d.js", "../src/webworker_glue.js"],
|
||||
"sourcesContent": ["let wasm;\n\nconst heap = new Array(128).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 < 132) 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\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\nconst cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );\n\nif (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };\n\nlet cachedUint8Memory0 = null;\n\nfunction getUint8Memory0() {\n if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {\n cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8Memory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));\n}\n\nfunction isLikeNone(x) {\n return x === undefined || x === null;\n}\n\nlet cachedFloat64Memory0 = null;\n\nfunction getFloat64Memory0() {\n if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {\n cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);\n }\n return cachedFloat64Memory0;\n}\n\nlet cachedInt32Memory0 = null;\n\nfunction getInt32Memory0() {\n if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {\n cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);\n }\n return cachedInt32Memory0;\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 cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );\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, 1) >>> 0;\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, 1) >>> 0;\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 iLine truncated
|
||||
"mappings": "MAAA,IAAIA,EAEEC,EAAO,IAAI,MAAM,GAAG,EAAE,KAAK,MAAS,EAE1CA,EAAK,KAAK,OAAW,KAAM,GAAM,EAAK,EAEtC,SAASC,EAAUC,EAAK,CAAE,OAAOF,EAAKE,CAAG,CAAG,CAE5C,IAAIC,EAAYH,EAAK,OAErB,SAASI,EAAWF,EAAK,CACjBA,EAAM,MACVF,EAAKE,CAAG,EAAIC,EACZA,EAAYD,EAChB,CAEA,SAASG,EAAWH,EAAK,CACrB,IAAMI,EAAML,EAAUC,CAAG,EACzB,OAAAE,EAAWF,CAAG,EACPI,CACX,CAEA,SAASC,EAAcC,EAAK,CACpBL,IAAcH,EAAK,QAAQA,EAAK,KAAKA,EAAK,OAAS,CAAC,EACxD,IAAME,EAAMC,EACZ,OAAAA,EAAYH,EAAKE,CAAG,EAEpBF,EAAKE,CAAG,EAAIM,EACLN,CACX,CAEA,IAAMO,EAAqB,OAAO,YAAgB,IAAc,IAAI,YAAY,QAAS,CAAE,UAAW,GAAM,MAAO,EAAK,CAAC,EAAI,CAAE,OAAQ,IAAM,CAAE,MAAM,MAAM,2BAA2B,CAAE,CAAE,EAEtL,OAAO,YAAgB,KAAeA,EAAkB,OAAO,EAEnE,IAAIC,EAAqB,KAEzB,SAASC,GAAkB,CACvB,OAAID,IAAuB,MAAQA,EAAmB,aAAe,KACjEA,EAAqB,IAAI,WAAWX,EAAK,OAAO,MAAM,GAEnDW,CACX,CAEA,SAASE,EAAmBC,EAAKC,EAAK,CAClC,OAAAD,EAAMA,IAAQ,EACPJ,EAAkB,OAAOE,EAAgB,EAAE,SAASE,EAAKA,EAAMC,CAAG,CAAC,CAC9E,CAEA,SAASC,EAAWC,EAAG,CACnB,OAA0BA,GAAM,IACpC,CAEA,IAAIC,EAAuB,KAE3B,SAASC,GAAoB,CACzB,OAAID,IA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AK,SAAWD,EAETC,CACX,CACA,SAASS,EAAiBd,EAAMC,EAAMS,EAAM,CACxCvD,EAAK,4DAA4D6C,EAAMC,EAAMtC,EAAc+C,CAAI,CAAC,CACpG,CAEA,SAASK,EAAoB9C,EAAKC,EAAK,CACnC,OAAAD,EAAMA,IAAQ,EACPF,EAAgB,EAAE,SAASE,EAAM,EAAGA,EAAM,EAAIC,CAAG,CAC5D,CAKO,SAAS8C,EAAOZ,EAAO,CAC1B,GAAI,CACA,IAAMa,EAAS9D,EAAK,gCAAgC,GAAG,EACjDwD,EAAOH,EAAkBJ,EAAOjD,EAAK,iBAAiB,EACtDyD,EAAOzB,EACbhC,EAAK,OAAO8D,EAAQN,EAAMC,CAAI,EAC9B,IAAIM,EAAK1C,EAAgB,EAAEyC,EAAS,EAAI,CAAC,EACrCE,EAAK3C,EAAgB,EAAEyC,EAAS,EAAI,CAAC,EACrCG,EAAKL,EAAoBG,EAAIC,CAAE,EAAE,MAAM,EAC3C,OAAAhE,EAAK,gBAAgB+D,EAAIC,EAAK,EAAG,CAAC,EAC3BC,CACX,QAAE,CACEjE,EAAK,gCAAgC,EAAE,CAC3C,CACJ,CAEA,SAASkE,EAAWC,EAAM,CAAE,MAAO,IAAM,CAAE,MAAM,IAAI,MAAM,GAAGA,CAAI,iBAAiB,CAAG,CAAG,CASzF,IAAIC,EAAsB,KAE1B,SAASC,GAAmB,CACxB,OAAID,IAAwB,MAAQA,EAAoB,aAAe,KACnEA,EAAsB,IAAI,YAAYE,EAAK,OAAO,MAAM,GAErDF,CACX,CAEA,SAASG,EAAyBC,EAAKC,EAAK,CACxCDLine truncated
|
||||
"names": ["wasm", "heap", "getObject", "idx", "heap_next", "dropObject", "takeObject", "ret", "addHeapObject", "obj", "cachedTextDecoder", "cachedUint8Memory0", "getUint8Memory0", "getStringFromWasm0", "ptr", "len", "isLikeNone", "x", "cachedFloat64Memory0", "getFloat64Memory0", "cachedInt32Memory0", "getInt32Memory0", "debugString", "val", "type", "description", "name", "length", "debug", "i", "builtInMatches", "className", "WASM_VECTOR_LEN", "cachedTextEncoder", "encodeString", "arg", "view", "buf", "passStringToWasm0", "malloc", "realloc", "mem", "offset", "code", "makeMutClosure", "arg0", "arg1", "dtor", "f", "state", "real", "args", "a", "passArray8ToWasm0", "__wbg_adapter_18", "arg2", "ptr0", "len0", "makeClosure", "__wbg_adapter_21", "getArrayU8FromWasm0", "run_ai", "retptr", "r0", "r1", "v2", "notDefined", "what", "cachedUint32Memory0", "getUint32Memory0", "wasm", "getArrayJsValueFromWasm0", "ptr", "len", "slice", "result", "i", "takeObject", "handleError", "f", "args", "e", "addHeapObject", "__wbg_load", "module", "imports", "bytes", "instance", "__wbg_get_imports", "arg0", "ret", "getObject", "notDefined", "arg1", "v0", "getArrayU8FromWasm0", "getStringFromWasm0", "obj", "getFloat64Memory0", "isLikeNone", "getInt32Memory0", "ptr1", "passStringToWasm0", "len1", "WASM_VECTOR_LEN", "deferred0_0", "deferred0_1", "arg2", "arg3", "arg4", "debugString", "makeMutClosure", "__wbg_adapter_18", "makeClosure", "__wbg_adapter_21", "__wbg_finalize_init", "instance", "module", "wasm", "__wbg_init", "cachedFloat64Memory0", "cachedInt32Memory0", "cachedUint32Memory0", "cachedUint8Memory0", "__wbg_init", "input", "wasm", "imports", "__wbg_get_imports", "instance", "module", "__wbg_load", "__wbg_finalize_init", "tic_tac_toe_4d_default", "__wbg_init", "tic_tac_toe_4d_default", "x", "event", "run_ai"]
|
||||
}
|
||||
@@ -151,6 +151,12 @@ window.points = (async () => {
|
||||
conditions: "Recurse to a stack depth of 100 or more on RPNCalc v4",
|
||||
description: "For using RPNCalcV4 as it is meant to be used - highly, highly recursively.",
|
||||
points: 18.324
|
||||
},
|
||||
ttt4Win: {
|
||||
title: "Shape Rotator",
|
||||
conditions: "Win 4D Tic-Tac-Toe",
|
||||
description: "You won a game of 4D Tic-Tac-Toe against our highly advanced artificial intelligence, showing your utter comprehension of 4D space.",
|
||||
points: 37.9
|
||||
}
|
||||
}
|
||||
|
||||
@@ -407,21 +413,21 @@ if (sidenotes && footnotes) {
|
||||
const notes = []
|
||||
// read off sidenotes to place
|
||||
for (const item of footnoteItems) {
|
||||
const itemRect = item.getBoundingClientRect()
|
||||
const link = article.querySelector(`#${item.id.replace(/^fn/, "fnref")}`)
|
||||
const linkRect = link.getBoundingClientRect()
|
||||
item.style.position = "absolute"
|
||||
item.style.left = getComputedStyle(sidenotes).paddingLeft
|
||||
item.style.marginBottom = item.style.marginTop = `${BORDER / 2}px`
|
||||
item.style.paddingBottom = item.style.paddingTop = `${BORDER / 2}px`
|
||||
const itemRect = item.getBoundingClientRect()
|
||||
notes.push({
|
||||
item,
|
||||
height: itemRect.height + BORDER,
|
||||
height: itemRect.height,
|
||||
target: linkRect.top - snRect.top
|
||||
})
|
||||
}
|
||||
// preliminary placement: place in valid regions going down
|
||||
for (const note of notes) {
|
||||
const index = inclusions.findLastIndex(inc => (inc.start + note.height) < note.target)
|
||||
const index = Math.max(inclusions.findLastIndex(inc => (inc.start + note.height) < note.target), 0)
|
||||
const next = inclusions.slice(index)
|
||||
.findIndex(inc => (sum(inc.contents.map(x => x.height)) + note.height) < (inc.end - inc.start))
|
||||
inclusions[index + next].contents.push(note)
|
||||
@@ -506,6 +512,22 @@ if (sidenotes && footnotes) {
|
||||
window.relayout = relayout
|
||||
}
|
||||
|
||||
const fixDetailsSummary = () => {
|
||||
const el = document.getElementById(window.location.hash.slice(1))
|
||||
var parent = el
|
||||
if (!el) return
|
||||
while (parent.parentElement) {
|
||||
if (parent.nodeName === "DETAILS") {
|
||||
parent.setAttribute("open", true)
|
||||
}
|
||||
parent = parent.parentElement
|
||||
}
|
||||
el.scrollIntoView()
|
||||
}
|
||||
|
||||
window.addEventListener("hashchange", fixDetailsSummary)
|
||||
fixDetailsSummary()
|
||||
|
||||
const customStyle = localStorage.getItem("user-stylesheet")
|
||||
let customStyleEl = null
|
||||
if (customStyle) {
|
||||
|
||||