Skip to content

Commit

Permalink
[scramble] Square-1.
Browse files Browse the repository at this point in the history
  • Loading branch information
lgarron committed Aug 4, 2021
1 parent b97e940 commit 52fb58f
Show file tree
Hide file tree
Showing 8 changed files with 1,441 additions and 6 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
"/src/static",
"/snowpack.config.mjs",
"/src/cubing/search/inside/solve/vendor/min2phase/gwt.js",
"/src/cubing/search/inside/solve/vendor/sq12phase/scramble_sq1.js",
"/src/cubing/search/worker-inside-generated*",
"/script/test/dist/esm/parcel/parcel-package/**/*",
"/*/index.d.ts",
Expand Down
6 changes: 6 additions & 0 deletions src/cubing/search/inside/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import {
import { setIsInsideWorker } from "./inside-worker";
import { bigCubeRandomMoves } from "./solve/puzzles/big-cubes";
import { oriented555RandomMoves } from "./solve/puzzles/5x5x5";
import { getRandomSquare1Scramble } from "./solve/puzzles/sq1";

setIsInsideWorker(true);

Expand Down Expand Up @@ -124,6 +125,11 @@ export const insideAPI = {
"randomPyraminxScrambleFixedOrientation",
randomPyraminxScrambleFixedOrientation,
);
case "sq1":
return measurePerf(
"getRandomSquare1Scramble",
getRandomSquare1Scramble,
);
default:
throw new Error(`unsupported event: ${eventID}`);
}
Expand Down
6 changes: 6 additions & 0 deletions src/cubing/search/inside/solve/puzzles/sq1.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Alg } from "../../../../alg";
import { getRandomSquare1ScrambleString } from "../vendor/sq12phase/scramble_sq1";

export async function getRandomSquare1Scramble(): Promise<Alg> {
return Alg.fromString(await getRandomSquare1ScrambleString());
}
Loading

0 comments on commit 52fb58f

Please sign in to comment.