|
|
@ -1,4 +1,4 @@
|
|
|
|
import { createEffect, createSignal, onCleanup } from "solid-js";
|
|
|
|
import { createSignal, onCleanup } from "solid-js";
|
|
|
|
import { applyMovesGenerator, type State } from "../../game.ts";
|
|
|
|
import { applyMovesGenerator, type State } from "../../game.ts";
|
|
|
|
import { unwrap } from "solid-js/store";
|
|
|
|
import { unwrap } from "solid-js/store";
|
|
|
|
import clone from "../../clone.ts";
|
|
|
|
import clone from "../../clone.ts";
|
|
|
@ -84,7 +84,7 @@ export default function useAnimation(
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
start() {
|
|
|
|
start() {
|
|
|
|
const stateClone = clone(unwrap(state));
|
|
|
|
const stateClone = clone(unwrap(state));
|
|
|
|
const generator: Generator<State, State, unknown> = applyMovesGenerator(stateClone, true);
|
|
|
|
const generator = applyMovesGenerator(stateClone, true) as Generator<State, undefined, unknown>;
|
|
|
|
setTemporaryState(clone(stateClone));
|
|
|
|
setTemporaryState(clone(stateClone));
|
|
|
|
start(generator);
|
|
|
|
start(generator);
|
|
|
|
},
|
|
|
|
},
|
|
|
|