diff --git a/Makefile b/Makefile index 8881f59..84f3cc3 100644 --- a/Makefile +++ b/Makefile @@ -24,8 +24,8 @@ wasm: chess.wasm codegen: codegen.c $(CC) -o $@ $(CFLAGS) $^ -chess.wasm: wasm-compat-chatgpt.c mbb_rook.h mbb_bishop.h engine.h - $(CC) -DWASM -o $@ wasm-compat-chatgpt.c $(CFLAGS.$(CC)) $(CFLAGS.$(CC).wasm) +chess.wasm: wasm-compat.c mbb_rook.h mbb_bishop.h engine.h + $(CC) -DWASM -o $@ wasm-compat.c $(CFLAGS.$(CC)) $(CFLAGS.$(CC).wasm) mbb_rook.h: codegen ./codegen diff --git a/chess-worker.js b/chess-worker.js index 4f9859d..f8105b6 100644 --- a/chess-worker.js +++ b/chess-worker.js @@ -1,7 +1,7 @@ let exports; async function init() { - const resp = await fetch("./chess.wasm"); + const resp = await fetch("./chess.wasm?rand=" + crypto.randomUUID()); if (!resp.ok) throw new Error(`fetch wasm failed ${resp.status} ${resp.statusText}`); const { instance } = await WebAssembly.instantiateStreaming(resp, {}); diff --git a/chess.html b/chess.html index d4e4887..3a17924 100644 --- a/chess.html +++ b/chess.html @@ -36,6 +36,7 @@
-+