cubing 0.42.1 → 0.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/README.md +1 -1
  2. package/dist/bin/order.js +22 -0
  3. package/dist/bin/order.js.map +7 -0
  4. package/dist/bin/puzzle-geometry-bin.js +284 -0
  5. package/dist/bin/puzzle-geometry-bin.js.map +7 -0
  6. package/dist/bin/scramble.js +115 -0
  7. package/dist/bin/scramble.js.map +7 -0
  8. package/dist/{cubing/KPattern-12e23b1f.d.ts → lib/cubing/KPattern-60960997.d.ts} +1 -1
  9. package/dist/{cubing/TwizzleLink-8eaf164c.d.ts → lib/cubing/TwizzleLink-3c302469.d.ts} +1 -1
  10. package/dist/{cubing → lib/cubing}/alg/index.js +1 -1
  11. package/dist/{cubing → lib/cubing}/bluetooth/index.d.ts +3 -3
  12. package/dist/{cubing → lib/cubing}/bluetooth/index.js +48 -45
  13. package/dist/{cubing → lib/cubing}/bluetooth/index.js.map +2 -2
  14. package/dist/{cubing/bluetooth-puzzle-91e73b7f.d.ts → lib/cubing/bluetooth-puzzle-c3224834.d.ts} +1 -1
  15. package/dist/{cubing/chunk-Y6TQYMMT.js → lib/cubing/chunks/chunk-2N56G6TG.js} +5 -5
  16. package/dist/{cubing/chunk-Y6TQYMMT.js.map → lib/cubing/chunks/chunk-2N56G6TG.js.map} +2 -2
  17. package/dist/{cubing/chunk-AU3TSTCA.js → lib/cubing/chunks/chunk-32CXD7UA.js} +31 -32
  18. package/dist/{cubing/chunk-AU3TSTCA.js.map → lib/cubing/chunks/chunk-32CXD7UA.js.map} +2 -2
  19. package/dist/{cubing/chunk-7QE2OVHX.js → lib/cubing/chunks/chunk-7GUL3OBQ.js} +1 -1
  20. package/dist/{cubing/chunk-7QE2OVHX.js.map → lib/cubing/chunks/chunk-7GUL3OBQ.js.map} +1 -1
  21. package/dist/{cubing/chunk-ULQMFOA2.js → lib/cubing/chunks/chunk-7X47IY3P.js} +15 -13
  22. package/dist/{cubing/chunk-ULQMFOA2.js.map → lib/cubing/chunks/chunk-7X47IY3P.js.map} +2 -2
  23. package/dist/{cubing/chunk-VSFPWTDH.js → lib/cubing/chunks/chunk-DYHU7CO7.js} +616 -34
  24. package/dist/lib/cubing/chunks/chunk-DYHU7CO7.js.map +7 -0
  25. package/dist/{cubing/chunk-QLTH326B.js → lib/cubing/chunks/chunk-KDMCYBSC.js} +2 -2
  26. package/dist/{cubing/chunk-QLTH326B.js.map → lib/cubing/chunks/chunk-KDMCYBSC.js.map} +1 -1
  27. package/dist/lib/cubing/chunks/chunk-NAPITA3L.js +1 -0
  28. package/dist/{cubing/chunk-3ON3T3OH.js → lib/cubing/chunks/chunk-NB6OOT2E.js} +3 -3
  29. package/dist/{cubing/chunk-3ON3T3OH.js.map → lib/cubing/chunks/chunk-NB6OOT2E.js.map} +1 -1
  30. package/dist/{cubing/chunk-6OUID4YZ.js → lib/cubing/chunks/chunk-NEAVVKH5.js} +2 -2
  31. package/dist/{cubing/chunk-6OUID4YZ.js.map → lib/cubing/chunks/chunk-NEAVVKH5.js.map} +1 -1
  32. package/dist/{cubing/chunk-OLH526Y4.js → lib/cubing/chunks/chunk-QF4HTZYW.js} +11 -10
  33. package/dist/lib/cubing/chunks/chunk-QF4HTZYW.js.map +7 -0
  34. package/dist/{cubing/chunk-KF2JGMZA.js → lib/cubing/chunks/chunk-RS62HLA5.js} +21 -19
  35. package/dist/{cubing/chunk-KF2JGMZA.js.map → lib/cubing/chunks/chunk-RS62HLA5.js.map} +2 -2
  36. package/dist/{cubing/chunk-ZYCJIZDN.js → lib/cubing/chunks/chunk-VL22SFND.js} +1 -1
  37. package/dist/{cubing/chunk-ZYCJIZDN.js.map → lib/cubing/chunks/chunk-VL22SFND.js.map} +1 -1
  38. package/dist/{cubing/chunk-FCRM3RQU.js → lib/cubing/chunks/chunk-Z2CCB3XX.js} +61 -76
  39. package/dist/{cubing/chunk-FCRM3RQU.js.map → lib/cubing/chunks/chunk-Z2CCB3XX.js.map} +2 -2
  40. package/dist/{cubing/chunk-YEOYXOGB.js → lib/cubing/chunks/chunk-ZUPLJQAD.js} +3 -3
  41. package/dist/{cubing/chunk-YEOYXOGB.js.map → lib/cubing/chunks/chunk-ZUPLJQAD.js.map} +1 -1
  42. package/dist/lib/cubing/chunks/inside-7XZ5YPBP.js +16 -0
  43. package/dist/{cubing/inside-AZHBOSXQ.js.map → lib/cubing/chunks/inside-7XZ5YPBP.js.map} +2 -2
  44. package/dist/{cubing/puzzles-dynamic-3x3x3-JFZVE27C.js → lib/cubing/chunks/puzzles-dynamic-3x3x3-NSCZM77Q.js} +1 -1
  45. package/dist/{cubing/puzzles-dynamic-3x3x3-JFZVE27C.js.map → lib/cubing/chunks/puzzles-dynamic-3x3x3-NSCZM77Q.js.map} +1 -1
  46. package/dist/{cubing/puzzles-dynamic-4x4x4-DT42HVIY.js → lib/cubing/chunks/puzzles-dynamic-4x4x4-REUXFQJ4.js} +1 -1
  47. package/dist/{cubing/puzzles-dynamic-4x4x4-DT42HVIY.js.map → lib/cubing/chunks/puzzles-dynamic-4x4x4-REUXFQJ4.js.map} +1 -1
  48. package/dist/{cubing/puzzles-dynamic-megaminx-QQYC32WM.js → lib/cubing/chunks/puzzles-dynamic-megaminx-2LVHIDL4.js} +1 -1
  49. package/dist/{cubing/puzzles-dynamic-megaminx-QQYC32WM.js.map → lib/cubing/chunks/puzzles-dynamic-megaminx-2LVHIDL4.js.map} +1 -1
  50. package/dist/{cubing/puzzles-dynamic-side-events-42Q52YAB.js → lib/cubing/chunks/puzzles-dynamic-side-events-HEMWSAMQ.js} +11 -329
  51. package/dist/lib/cubing/chunks/puzzles-dynamic-side-events-HEMWSAMQ.js.map +7 -0
  52. package/dist/{cubing/puzzles-dynamic-unofficial-PCHNKY4Y.js → lib/cubing/chunks/puzzles-dynamic-unofficial-RETSTRRW.js} +1 -1
  53. package/dist/{cubing/puzzles-dynamic-unofficial-PCHNKY4Y.js.map → lib/cubing/chunks/puzzles-dynamic-unofficial-RETSTRRW.js.map} +1 -1
  54. package/dist/{cubing/search-dynamic-sgs-side-events-5U7NX34Z.js → lib/cubing/chunks/search-dynamic-sgs-side-events-67TCU227.js} +14 -14
  55. package/dist/{cubing/search-dynamic-sgs-side-events-5U7NX34Z.js.map → lib/cubing/chunks/search-dynamic-sgs-side-events-67TCU227.js.map} +2 -2
  56. package/dist/{cubing/search-dynamic-sgs-unofficial-YA6LSNFG.js → lib/cubing/chunks/search-dynamic-sgs-unofficial-OUTZD5Y2.js} +7 -7
  57. package/dist/{cubing/search-dynamic-sgs-unofficial-YA6LSNFG.js.map → lib/cubing/chunks/search-dynamic-sgs-unofficial-OUTZD5Y2.js.map} +2 -2
  58. package/dist/{cubing/search-dynamic-solve-3x3x3-HM7RKVEM.js → lib/cubing/chunks/search-dynamic-solve-3x3x3-5UOUZX2V.js} +1 -1
  59. package/dist/{cubing/search-dynamic-solve-3x3x3-HM7RKVEM.js.map → lib/cubing/chunks/search-dynamic-solve-3x3x3-5UOUZX2V.js.map} +1 -1
  60. package/dist/{cubing/search-dynamic-solve-4x4x4-Z26CIIGT.js → lib/cubing/chunks/search-dynamic-solve-4x4x4-7NWGTCEG.js} +12 -9
  61. package/dist/lib/cubing/chunks/search-dynamic-solve-4x4x4-7NWGTCEG.js.map +7 -0
  62. package/dist/{cubing/search-dynamic-solve-fto-GGEYM3K6.js → lib/cubing/chunks/search-dynamic-solve-fto-EY5ZVAGO.js} +1 -1
  63. package/dist/{cubing/search-dynamic-solve-fto-GGEYM3K6.js.map → lib/cubing/chunks/search-dynamic-solve-fto-EY5ZVAGO.js.map} +1 -1
  64. package/dist/{cubing/search-dynamic-solve-kilominx-VUT2DIRQ.js → lib/cubing/chunks/search-dynamic-solve-kilominx-WREDL6AE.js} +2 -2
  65. package/dist/{cubing/search-dynamic-solve-kilominx-VUT2DIRQ.js.map → lib/cubing/chunks/search-dynamic-solve-kilominx-WREDL6AE.js.map} +1 -1
  66. package/dist/{cubing/search-dynamic-solve-master_tetraminx-WJWLROFP.js → lib/cubing/chunks/search-dynamic-solve-master_tetraminx-3D4MBF3V.js} +1 -1
  67. package/dist/{cubing/search-dynamic-solve-master_tetraminx-WJWLROFP.js.map → lib/cubing/chunks/search-dynamic-solve-master_tetraminx-3D4MBF3V.js.map} +1 -1
  68. package/dist/{cubing/search-dynamic-solve-sq1-TO7UHE6Y.js → lib/cubing/chunks/search-dynamic-solve-sq1-INOYNRSJ.js} +1 -1
  69. package/dist/{cubing/search-dynamic-solve-sq1-TO7UHE6Y.js.map → lib/cubing/chunks/search-dynamic-solve-sq1-INOYNRSJ.js.map} +1 -1
  70. package/dist/{cubing → lib/cubing/chunks}/search-worker-entry.js +4 -4
  71. package/dist/{cubing → lib/cubing/chunks}/search-worker-entry.js.map +1 -1
  72. package/dist/{cubing/twisty-dynamic-3d-NTZMGNOB.js → lib/cubing/chunks/twisty-dynamic-3d-EKFIEPIM.js} +78 -37
  73. package/dist/{cubing/twisty-dynamic-3d-NTZMGNOB.js.map → lib/cubing/chunks/twisty-dynamic-3d-EKFIEPIM.js.map} +2 -2
  74. package/dist/{cubing/twsearch-BDAXZGZU-SJCPOVWW.js → lib/cubing/chunks/twsearch-BDAXZGZU-Q2YC2EQ6.js} +1 -1
  75. package/dist/{cubing/twsearch-BDAXZGZU-SJCPOVWW.js.map → lib/cubing/chunks/twsearch-BDAXZGZU-Q2YC2EQ6.js.map} +1 -1
  76. package/dist/{cubing/twsearch-INIYLWAM.js → lib/cubing/chunks/twsearch-SLVE4NQH.js} +3 -3
  77. package/dist/{cubing/twsearch-INIYLWAM.js.map → lib/cubing/chunks/twsearch-SLVE4NQH.js.map} +1 -1
  78. package/dist/{cubing → lib/cubing}/kpuzzle/index.d.ts +1 -1
  79. package/dist/{cubing → lib/cubing}/kpuzzle/index.js +2 -2
  80. package/dist/{cubing → lib/cubing}/notation/index.d.ts +2 -2
  81. package/dist/{cubing → lib/cubing}/notation/index.js +4 -4
  82. package/dist/{cubing/outside-deaac55d.d.ts → lib/cubing/outside-2f424d30.d.ts} +1 -1
  83. package/dist/{cubing → lib/cubing}/protocol/index.d.ts +1 -1
  84. package/dist/{cubing → lib/cubing}/protocol/index.js +4 -4
  85. package/dist/lib/cubing/puzzle-geometry/index.d.ts +7 -0
  86. package/dist/{cubing → lib/cubing}/puzzle-geometry/index.js +142 -62
  87. package/dist/lib/cubing/puzzle-geometry/index.js.map +7 -0
  88. package/dist/{cubing → lib/cubing}/puzzles/index.d.ts +3 -3
  89. package/dist/{cubing → lib/cubing}/puzzles/index.js +4 -4
  90. package/dist/lib/cubing/scramble/index.d.ts +3 -0
  91. package/dist/lib/cubing/scramble/index.js +16 -0
  92. package/dist/{cubing → lib/cubing}/search/index.d.ts +2 -2
  93. package/dist/{cubing → lib/cubing}/search/index.js +9 -10
  94. package/dist/lib/cubing/search/index.js.map +7 -0
  95. package/dist/{cubing → lib/cubing}/stream/index.d.ts +2 -2
  96. package/dist/{cubing → lib/cubing}/stream/index.js +4 -1
  97. package/dist/{cubing → lib/cubing}/stream/index.js.map +2 -2
  98. package/dist/{cubing → lib/cubing}/twisty/index.d.ts +3 -3
  99. package/dist/{cubing → lib/cubing}/twisty/index.js +310 -313
  100. package/dist/{cubing → lib/cubing}/twisty/index.js.map +3 -3
  101. package/package.json +40 -41
  102. package/dist/cubing/chunk-E4S4UDA6.js +0 -615
  103. package/dist/cubing/chunk-E4S4UDA6.js.map +0 -7
  104. package/dist/cubing/chunk-OLH526Y4.js.map +0 -7
  105. package/dist/cubing/chunk-VSFPWTDH.js.map +0 -7
  106. package/dist/cubing/inside-AZHBOSXQ.js +0 -17
  107. package/dist/cubing/puzzle-geometry/index.d.ts +0 -7
  108. package/dist/cubing/puzzle-geometry/index.js.map +0 -7
  109. package/dist/cubing/puzzles-dynamic-side-events-42Q52YAB.js.map +0 -7
  110. package/dist/cubing/scramble/index.d.ts +0 -3
  111. package/dist/cubing/scramble/index.js +0 -16
  112. package/dist/cubing/search-dynamic-solve-4x4x4-Z26CIIGT.js.map +0 -7
  113. package/src/README.md +0 -10
  114. /package/dist/{cubing → lib/cubing}/Alg-c6770822.d.ts +0 -0
  115. /package/dist/{cubing → lib/cubing}/alg/index.d.ts +0 -0
  116. /package/dist/{cubing → lib/cubing}/alg/index.js.map +0 -0
  117. /package/dist/{cubing/kpuzzle/index.js.map → lib/cubing/chunks/chunk-NAPITA3L.js.map} +0 -0
  118. /package/dist/{cubing/notation → lib/cubing/kpuzzle}/index.js.map +0 -0
  119. /package/dist/{cubing/protocol → lib/cubing/notation}/index.js.map +0 -0
  120. /package/dist/{cubing → lib/cubing}/parseAlg-d2c83795.d.ts +0 -0
  121. /package/dist/{cubing/puzzles → lib/cubing/protocol}/index.js.map +0 -0
  122. /package/dist/{cubing/scramble → lib/cubing/puzzles}/index.js.map +0 -0
  123. /package/dist/{cubing/search → lib/cubing/scramble}/index.js.map +0 -0
package/README.md CHANGED
@@ -34,7 +34,7 @@ import { Alg } from "cubing/alg";
34
34
  import { TwistyPlayer } from "cubing/twisty";
35
35
  ```
36
36
 
37
- Please note that `cubing.js` requires ES2020 module compatibility. See [here](https://js.cubing.net/cubing/#javascript).
37
+ Please note that `cubing.js` requires ES2022 module compatibility. See [here](https://js.cubing.net/cubing/#javascript).
38
38
 
39
39
  ## Contributing
40
40
 
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/bin/order.ts
4
+ import { KPuzzle } from "cubing/kpuzzle";
5
+ import { getPuzzleGeometryByName } from "cubing/puzzle-geometry";
6
+ import { puzzles } from "cubing/puzzles";
7
+ var puzzleName = process.argv[2];
8
+ var algString = process.argv[3];
9
+ if (!(puzzleName && algString)) {
10
+ console.log("Usage: order <puzzle-geometry-id> <alg>");
11
+ console.log("");
12
+ console.log(`Example: order 3x3x3 "R U R' U R U2' R'"`);
13
+ process.exit(0);
14
+ }
15
+ var kpuzzle = await puzzles[puzzleName].kpuzzle();
16
+ if (!kpuzzle) {
17
+ const pg = getPuzzleGeometryByName(puzzleName, { allMoves: true });
18
+ kpuzzle = new KPuzzle(pg.getKPuzzleDefinition(true));
19
+ }
20
+ var order = kpuzzle.algToTransformation(algString).repetitionOrder();
21
+ console.log(order);
22
+ //# sourceMappingURL=order.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/bin/order.ts"],
4
+ "sourcesContent": ["// To run this file directly:\n// bun run src/bin/order.ts -- <program args>\n\nimport { KPuzzle } from \"cubing/kpuzzle\";\nimport { getPuzzleGeometryByName } from \"cubing/puzzle-geometry\";\nimport { puzzles } from \"cubing/puzzles\";\n\n/*\n * Given a puzzle name and an algorithm, calculate the order of that\n * algorithm (how many repetitions are needed for the algorithm to be\n * the no-op).\n */\n\nconst puzzleName = process.argv[2];\nconst algString = process.argv[3];\n\nif (!(puzzleName && algString)) {\n console.log(\"Usage: order <puzzle-geometry-id> <alg>\");\n console.log(\"\");\n console.log(\"Example: order 3x3x3 \\\"R U R' U R U2' R'\\\"\");\n process.exit(0);\n}\n\n/*\n * Turn a name into a geometry.\n */\n\n// @ts-ignore: Top-level await is okay because this is not part of the main library.\nlet kpuzzle = await puzzles[puzzleName].kpuzzle();\nif (!kpuzzle) {\n const pg = getPuzzleGeometryByName(puzzleName, { allMoves: true });\n kpuzzle = new KPuzzle(pg.getKPuzzleDefinition(true));\n}\nconst order = kpuzzle.algToTransformation(algString).repetitionOrder();\nconsole.log(order);\n"],
5
+ "mappings": ";;;AAGA,SAAS,eAAe;AACxB,SAAS,+BAA+B;AACxC,SAAS,eAAe;AAQxB,IAAM,aAAa,QAAQ,KAAK,CAAC;AACjC,IAAM,YAAY,QAAQ,KAAK,CAAC;AAEhC,IAAI,EAAE,cAAc,YAAY;AAC9B,UAAQ,IAAI,yCAAyC;AACrD,UAAQ,IAAI,EAAE;AACd,UAAQ,IAAI,0CAA4C;AACxD,UAAQ,KAAK,CAAC;AAChB;AAOA,IAAI,UAAU,MAAM,QAAQ,UAAU,EAAE,QAAQ;AAChD,IAAI,CAAC,SAAS;AACZ,QAAM,KAAK,wBAAwB,YAAY,EAAE,UAAU,KAAK,CAAC;AACjE,YAAU,IAAI,QAAQ,GAAG,qBAAqB,IAAI,CAAC;AACrD;AACA,IAAM,QAAQ,QAAQ,oBAAoB,SAAS,EAAE,gBAAgB;AACrE,QAAQ,IAAI,KAAK;",
6
+ "names": []
7
+ }
@@ -0,0 +1,284 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/bin/puzzle-geometry-bin.ts
4
+ import {
5
+ getPG3DNamedPuzzles,
6
+ parsePuzzleDescription,
7
+ PuzzleGeometry
8
+ } from "cubing/puzzle-geometry";
9
+ function asstructured(v) {
10
+ if (typeof v === "string") {
11
+ return JSON.parse(v);
12
+ }
13
+ return v;
14
+ }
15
+ function asboolean(v) {
16
+ if (typeof v === "string") {
17
+ if (v === "false") {
18
+ return false;
19
+ }
20
+ return true;
21
+ } else {
22
+ return v ? true : false;
23
+ }
24
+ }
25
+ function parsePGOptionList(optionlist) {
26
+ const options = {};
27
+ if (optionlist !== void 0) {
28
+ if (optionlist.length % 2 !== 0) {
29
+ throw new Error("Odd length in option list?");
30
+ }
31
+ for (let i = 0; i < optionlist.length; i += 2) {
32
+ if (optionlist[i] === "verbose") {
33
+ options.verbosity = (options.verbosity ?? 0) + 1;
34
+ } else if (optionlist[i] === "quiet") {
35
+ options.verbosity = 0;
36
+ } else if (optionlist[i] === "allmoves") {
37
+ options.allMoves = asboolean(optionlist[i + 1]);
38
+ } else if (optionlist[i] === "outerblockmoves") {
39
+ options.outerBlockMoves = asboolean(optionlist[i + 1]);
40
+ } else if (optionlist[i] === "vertexmoves") {
41
+ options.vertexMoves = asboolean(optionlist[i + 1]);
42
+ } else if (optionlist[i] === "rotations") {
43
+ options.addRotations = asboolean(optionlist[i + 1]);
44
+ } else if (optionlist[i] === "cornersets") {
45
+ options.includeCornerOrbits = asboolean(optionlist[i + 1]);
46
+ } else if (optionlist[i] === "centersets") {
47
+ options.includeCenterOrbits = asboolean(optionlist[i + 1]);
48
+ } else if (optionlist[i] === "edgesets") {
49
+ options.includeEdgeOrbits = asboolean(optionlist[i + 1]);
50
+ } else if (optionlist[i] === "omit") {
51
+ options.excludeOrbits = optionlist[i + 1];
52
+ } else if (optionlist[i] === "graycorners") {
53
+ options.grayCorners = asboolean(optionlist[i + 1]);
54
+ } else if (optionlist[i] === "graycenters") {
55
+ options.grayCenters = asboolean(optionlist[i + 1]);
56
+ } else if (optionlist[i] === "grayedges") {
57
+ options.grayEdges = asboolean(optionlist[i + 1]);
58
+ } else if (optionlist[i] === "movelist") {
59
+ options.moveList = asstructured(optionlist[i + 1]);
60
+ } else if (optionlist[i] === "killorientation") {
61
+ options.fixedOrientation = asboolean(optionlist[i + 1]);
62
+ } else if (optionlist[i] === "optimize") {
63
+ options.optimizeOrbits = asboolean(optionlist[i + 1]);
64
+ } else if (optionlist[i] === "scramble") {
65
+ options.scrambleAmount = optionlist[i + 1];
66
+ } else if (optionlist[i] === "fix") {
67
+ options.fixedPieceType = optionlist[i + 1];
68
+ } else if (optionlist[i] === "orientcenters") {
69
+ options.orientCenters = asboolean(optionlist[i + 1]);
70
+ } else if (optionlist[i] === "puzzleorientation") {
71
+ options.puzzleOrientation = asstructured(optionlist[i + 1]);
72
+ } else if (optionlist[i] === "puzzleorientations") {
73
+ options.puzzleOrientations = asstructured(optionlist[i + 1]);
74
+ } else {
75
+ throw new Error(
76
+ `Bad option while processing option list ${optionlist[i]}`
77
+ );
78
+ }
79
+ }
80
+ }
81
+ return options;
82
+ }
83
+ var dosvg = false;
84
+ var doss = false;
85
+ var doksolve = false;
86
+ var dogap = false;
87
+ var domathematica = false;
88
+ var docanon = false;
89
+ var do3d = false;
90
+ if (globalThis.process && process.argv && process.argv.length <= 2) {
91
+ console.log(
92
+ `Usage: puzzle-geometry [options] [puzzle]
93
+
94
+ Options:
95
+ --ksolve: write ksolve (tws) file
96
+ --svg: write SVG (default is flat; --3d makes it 3D)
97
+ --gap: write gap
98
+ --mathematica: write mathematica
99
+ --ss: execute Schrier-Sims calculation
100
+ --3d: use 3D format for SVG file
101
+ --canon: write canonical string analysis
102
+ --rotations: include full-puzzle rotations as moves
103
+ --allmoves: includes all moves (i.e., slice moves for 3x3x3)
104
+ --outerblockmoves: use outer block moves rather than slice moves
105
+ --vertexmoves: for tetrahedral puzzles, prefer vertex moves to face moves
106
+ --nocorners: ignore all corners
107
+ --noedges: ignore all edges
108
+ --nocenters: ignore all centers
109
+ --noorientation: ignore orientations
110
+ --orientcenters: give centers an orientation
111
+ --puzzleorientation: for 3D formats, give puzzle orientation
112
+ --moves movenames: restrict moves to this list (e.g, U2,F,r)
113
+ --optimize: optimize tws/ksolve/gap output
114
+ --scramble: scramble solved position
115
+ --fixcorner: choose moves to keep one corner fixed
116
+ --fixedge: choose moves to keep one edge fixed
117
+ --fixcenter: choose moves to keep one center fixed
118
+ --verbose (-v): make verbose
119
+
120
+ The puzzle can be given as a geometric description or by name.
121
+ The geometric description starts with c (cube), t (tetrahedron),
122
+ d (dodecahedron), i (icosahedron), or o (octahedron), then a
123
+ space, then a series of cuts. Each cut begins with f (for a
124
+ cut parallel to faces), v (for a cut perpendicular to a ray
125
+ from the center through a corner), or e (for a cut perpendicular
126
+ to a ray from the center through an edge) followed by a decimal
127
+ number giving a distance, where 1 is the distance between the
128
+ center of the puzzle and the center of a face.
129
+
130
+ The puzzle names recognized are 2x2x2 through 13x13x13, 20x20x20,
131
+ master skewb, professor skewb, compy cube, helicopter, dino,
132
+ little chop, pyramorphix, mastermorphix, pyraminx, Jing pyraminx,
133
+ master paramorphix, megaminx, gigaminx, pentultimate, starminx,
134
+ starminx 2, pyraminx crystal, chopasaurus, big chop, skewb diamond,
135
+ FTO, Christopher's jewel, octastar, Trajber's octahedron, radio chop,
136
+ icosamate, icosahedron 2, icosahedron 3, icosahedron static faces,
137
+ icosahedron moving faces, and Eitan's star.
138
+
139
+ Examples:
140
+ puzzlegeometry --ss 2x2x2
141
+ puzzlegeometry --ss --fixcorner 2x2x2
142
+ puzzlegeometry --ss --moves U,F2,r 4x4x4
143
+ puzzlegeometry --ksolve --optimize --moves U,F,R megaminx
144
+ puzzlegeometry --gap --noedges megaminx
145
+ `
146
+ );
147
+ }
148
+ if (globalThis.process && process.argv && process.argv.length >= 3) {
149
+ let desc;
150
+ const puzzleList = getPG3DNamedPuzzles();
151
+ let argp = 2;
152
+ const optionlist = [];
153
+ let showargs = true;
154
+ let pascalcomment = false;
155
+ while (argp < process.argv.length && process.argv[argp][0] === "-") {
156
+ const option = process.argv[argp++];
157
+ if (option === "--verbose" || option === "-v") {
158
+ optionlist.push("verbose", true);
159
+ } else if (option === "--quiet" || option === "-q") {
160
+ optionlist.push("quiet", true);
161
+ showargs = false;
162
+ } else if (option === "--ksolve") {
163
+ doksolve = true;
164
+ } else if (option === "--svg") {
165
+ showargs = false;
166
+ optionlist.push("quiet", true);
167
+ dosvg = true;
168
+ } else if (option === "--gap") {
169
+ dogap = true;
170
+ } else if (option === "--mathematica") {
171
+ domathematica = true;
172
+ pascalcomment = true;
173
+ } else if (option === "--ss") {
174
+ doss = true;
175
+ } else if (option === "--3d") {
176
+ do3d = true;
177
+ } else if (option === "--canon") {
178
+ docanon = true;
179
+ } else if (option === "--rotations") {
180
+ optionlist.push("rotations", true);
181
+ } else if (option === "--allmoves") {
182
+ optionlist.push("allmoves", true);
183
+ } else if (option === "--outerblockmoves") {
184
+ optionlist.push("outerblockmoves", true);
185
+ } else if (option === "--vertexmoves") {
186
+ optionlist.push("vertexmoves", true);
187
+ } else if (option === "--nocorners") {
188
+ optionlist.push("cornersets", false);
189
+ } else if (option === "--noedges") {
190
+ optionlist.push("edgesets", false);
191
+ } else if (option === "--noorientation") {
192
+ optionlist.push("killorientation", true);
193
+ } else if (option === "--nocenters") {
194
+ optionlist.push("centersets", false);
195
+ } else if (option === "--omit") {
196
+ optionlist.push("omit", process.argv[argp].split(","));
197
+ argp++;
198
+ } else if (option === "--moves") {
199
+ optionlist.push("movelist", process.argv[argp].split(","));
200
+ argp++;
201
+ } else if (option === "--optimize") {
202
+ optionlist.push("optimize", true);
203
+ } else if (option === "--scramble") {
204
+ optionlist.push("scramble", 100);
205
+ } else if (option === "--fixcorner") {
206
+ optionlist.push("fix", "v");
207
+ } else if (option === "--fixedge") {
208
+ optionlist.push("fix", "e");
209
+ } else if (option === "--fixcenter") {
210
+ optionlist.push("fix", "f");
211
+ } else if (option === "--orientcenters") {
212
+ optionlist.push("orientcenters", true);
213
+ } else if (option === "--puzzleorientation") {
214
+ optionlist.push("puzzleorientation", process.argv[argp]);
215
+ argp++;
216
+ } else {
217
+ throw new Error(`Bad option: ${option}`);
218
+ }
219
+ }
220
+ for (const [name, curDesc] of Object.entries(puzzleList)) {
221
+ if (name === process.argv[argp]) {
222
+ desc = curDesc;
223
+ break;
224
+ }
225
+ }
226
+ let puzzleDescription;
227
+ if (showargs) {
228
+ if (pascalcomment) {
229
+ console.log(`(* ${process.argv.join(" ")} *)`);
230
+ } else {
231
+ console.log(`# ${process.argv.join(" ")}`);
232
+ }
233
+ }
234
+ if (desc !== void 0) {
235
+ const parsed = parsePuzzleDescription(desc);
236
+ if (parsed === null) {
237
+ throw new Error("Could not parse puzzle description!");
238
+ }
239
+ puzzleDescription = parsed;
240
+ argp++;
241
+ } else {
242
+ const cuts = [];
243
+ const cutarg = argp++;
244
+ while (argp + 1 < process.argv.length && process.argv[argp].length === 1) {
245
+ cuts.push({
246
+ cutType: process.argv[argp],
247
+ distance: parseFloat(process.argv[argp + 1])
248
+ });
249
+ argp += 2;
250
+ }
251
+ puzzleDescription = {
252
+ shape: process.argv[cutarg],
253
+ cuts
254
+ };
255
+ }
256
+ const options = parsePGOptionList(optionlist);
257
+ const pg = new PuzzleGeometry(puzzleDescription, options);
258
+ pg.allstickers();
259
+ pg.genperms();
260
+ if (argp < process.argv.length) {
261
+ throw new Error("Unprocessed content at end of command line");
262
+ }
263
+ if (dogap) {
264
+ console.log(pg.writegap());
265
+ } else if (domathematica) {
266
+ console.log(pg.writemathematica());
267
+ } else if (doksolve) {
268
+ console.log(pg.writeksolve());
269
+ } else if (dosvg) {
270
+ console.log(pg.generatesvg(void 0, void 0, void 0, do3d));
271
+ } else if (do3d) {
272
+ console.log(JSON.stringify(pg.get3d()));
273
+ } else if (doss) {
274
+ pg.writeSchreierSims(console.log);
275
+ } else if (docanon) {
276
+ pg.showcanon((_) => console.log(_));
277
+ }
278
+ }
279
+ export {
280
+ asboolean,
281
+ asstructured,
282
+ parsePGOptionList
283
+ };
284
+ //# sourceMappingURL=puzzle-geometry-bin.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/bin/puzzle-geometry-bin.ts"],
4
+ "sourcesContent": ["// To run this file directly:\n// bun run src/bin/puzzle-geometry-bin.ts -- <program args>\n\nimport {\n type ExperimentalPuzzleBaseShape,\n type ExperimentalPuzzleCutType,\n getPG3DNamedPuzzles,\n parsePuzzleDescription,\n PuzzleGeometry,\n type ExperimentalPuzzleGeometryOptions,\n} from \"cubing/puzzle-geometry\";\nimport type {\n PuzzleCutDescription,\n PuzzleDescription,\n} from \"cubing/puzzle-geometry/PuzzleGeometry\";\n\nexport function asstructured(v: any): any {\n if (typeof v === \"string\") {\n return JSON.parse(v);\n }\n return v;\n}\nexport function asboolean(v: any): boolean {\n if (typeof v === \"string\") {\n if (v === \"false\") {\n return false;\n }\n return true;\n } else {\n return v ? true : false;\n }\n}\nexport function parsePGOptionList(\n optionlist?: any[],\n): ExperimentalPuzzleGeometryOptions {\n const options: ExperimentalPuzzleGeometryOptions = {};\n if (optionlist !== undefined) {\n if (optionlist.length % 2 !== 0) {\n throw new Error(\"Odd length in option list?\");\n }\n for (let i = 0; i < optionlist.length; i += 2) {\n if (optionlist[i] === \"verbose\") {\n options.verbosity = (options.verbosity ?? 0) + 1;\n } else if (optionlist[i] === \"quiet\") {\n options.verbosity = 0;\n } else if (optionlist[i] === \"allmoves\") {\n options.allMoves = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"outerblockmoves\") {\n options.outerBlockMoves = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"vertexmoves\") {\n options.vertexMoves = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"rotations\") {\n options.addRotations = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"cornersets\") {\n options.includeCornerOrbits = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"centersets\") {\n options.includeCenterOrbits = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"edgesets\") {\n options.includeEdgeOrbits = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"omit\") {\n options.excludeOrbits = optionlist[i + 1];\n } else if (optionlist[i] === \"graycorners\") {\n options.grayCorners = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"graycenters\") {\n options.grayCenters = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"grayedges\") {\n options.grayEdges = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"movelist\") {\n options.moveList = asstructured(optionlist[i + 1]);\n } else if (optionlist[i] === \"killorientation\") {\n options.fixedOrientation = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"optimize\") {\n options.optimizeOrbits = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"scramble\") {\n options.scrambleAmount = optionlist[i + 1];\n } else if (optionlist[i] === \"fix\") {\n options.fixedPieceType = optionlist[i + 1];\n } else if (optionlist[i] === \"orientcenters\") {\n options.orientCenters = asboolean(optionlist[i + 1]);\n } else if (optionlist[i] === \"puzzleorientation\") {\n options.puzzleOrientation = asstructured(optionlist[i + 1]);\n } else if (optionlist[i] === \"puzzleorientations\") {\n options.puzzleOrientations = asstructured(optionlist[i + 1]);\n } else {\n throw new Error(\n `Bad option while processing option list ${optionlist[i]}`,\n );\n }\n }\n }\n return options;\n}\n\nlet dosvg = false;\nlet doss = false;\nlet doksolve = false;\nlet dogap = false;\nlet domathematica = false;\nlet docanon = false;\nlet do3d = false;\nif (globalThis.process && process.argv && process.argv.length <= 2) {\n console.log(\n `Usage: puzzle-geometry [options] [puzzle]\n\nOptions:\n--ksolve: write ksolve (tws) file\n--svg: write SVG (default is flat; --3d makes it 3D)\n--gap: write gap\n--mathematica: write mathematica\n--ss: execute Schrier-Sims calculation\n--3d: use 3D format for SVG file\n--canon: write canonical string analysis\n--rotations: include full-puzzle rotations as moves\n--allmoves: includes all moves (i.e., slice moves for 3x3x3)\n--outerblockmoves: use outer block moves rather than slice moves\n--vertexmoves: for tetrahedral puzzles, prefer vertex moves to face moves\n--nocorners: ignore all corners\n--noedges: ignore all edges\n--nocenters: ignore all centers\n--noorientation: ignore orientations\n--orientcenters: give centers an orientation\n--puzzleorientation: for 3D formats, give puzzle orientation\n--moves movenames: restrict moves to this list (e.g, U2,F,r)\n--optimize: optimize tws/ksolve/gap output\n--scramble: scramble solved position\n--fixcorner: choose moves to keep one corner fixed\n--fixedge: choose moves to keep one edge fixed\n--fixcenter: choose moves to keep one center fixed\n--verbose (-v): make verbose\n\nThe puzzle can be given as a geometric description or by name.\nThe geometric description starts with c (cube), t (tetrahedron),\nd (dodecahedron), i (icosahedron), or o (octahedron), then a\nspace, then a series of cuts. Each cut begins with f (for a\ncut parallel to faces), v (for a cut perpendicular to a ray\nfrom the center through a corner), or e (for a cut perpendicular\nto a ray from the center through an edge) followed by a decimal\nnumber giving a distance, where 1 is the distance between the\ncenter of the puzzle and the center of a face.\n\nThe puzzle names recognized are 2x2x2 through 13x13x13, 20x20x20,\nmaster skewb, professor skewb, compy cube, helicopter, dino,\nlittle chop, pyramorphix, mastermorphix, pyraminx, Jing pyraminx,\nmaster paramorphix, megaminx, gigaminx, pentultimate, starminx,\nstarminx 2, pyraminx crystal, chopasaurus, big chop, skewb diamond,\nFTO, Christopher's jewel, octastar, Trajber's octahedron, radio chop,\nicosamate, icosahedron 2, icosahedron 3, icosahedron static faces,\nicosahedron moving faces, and Eitan's star.\n\nExamples:\n puzzlegeometry --ss 2x2x2\n puzzlegeometry --ss --fixcorner 2x2x2\n puzzlegeometry --ss --moves U,F2,r 4x4x4\n puzzlegeometry --ksolve --optimize --moves U,F,R megaminx\n puzzlegeometry --gap --noedges megaminx\n`,\n );\n}\nif (globalThis.process && process.argv && process.argv.length >= 3) {\n let desc;\n const puzzleList = getPG3DNamedPuzzles();\n let argp = 2;\n const optionlist = [];\n let showargs = true;\n let pascalcomment = false;\n while (argp < process.argv.length && process.argv[argp][0] === \"-\") {\n const option = process.argv[argp++];\n if (option === \"--verbose\" || option === \"-v\") {\n optionlist.push(\"verbose\", true);\n } else if (option === \"--quiet\" || option === \"-q\") {\n optionlist.push(\"quiet\", true);\n showargs = false;\n } else if (option === \"--ksolve\") {\n doksolve = true;\n } else if (option === \"--svg\") {\n showargs = false;\n optionlist.push(\"quiet\", true);\n dosvg = true;\n } else if (option === \"--gap\") {\n dogap = true;\n } else if (option === \"--mathematica\") {\n domathematica = true;\n pascalcomment = true;\n } else if (option === \"--ss\") {\n doss = true;\n } else if (option === \"--3d\") {\n do3d = true;\n } else if (option === \"--canon\") {\n docanon = true;\n } else if (option === \"--rotations\") {\n optionlist.push(\"rotations\", true);\n } else if (option === \"--allmoves\") {\n optionlist.push(\"allmoves\", true);\n } else if (option === \"--outerblockmoves\") {\n optionlist.push(\"outerblockmoves\", true);\n } else if (option === \"--vertexmoves\") {\n optionlist.push(\"vertexmoves\", true);\n } else if (option === \"--nocorners\") {\n optionlist.push(\"cornersets\", false);\n } else if (option === \"--noedges\") {\n optionlist.push(\"edgesets\", false);\n } else if (option === \"--noorientation\") {\n optionlist.push(\"killorientation\", true);\n } else if (option === \"--nocenters\") {\n optionlist.push(\"centersets\", false);\n } else if (option === \"--omit\") {\n optionlist.push(\"omit\", process.argv[argp].split(\",\"));\n argp++;\n } else if (option === \"--moves\") {\n optionlist.push(\"movelist\", process.argv[argp].split(\",\"));\n argp++;\n } else if (option === \"--optimize\") {\n optionlist.push(\"optimize\", true);\n } else if (option === \"--scramble\") {\n optionlist.push(\"scramble\", 100);\n } else if (option === \"--fixcorner\") {\n optionlist.push(\"fix\", \"v\");\n } else if (option === \"--fixedge\") {\n optionlist.push(\"fix\", \"e\");\n } else if (option === \"--fixcenter\") {\n optionlist.push(\"fix\", \"f\");\n } else if (option === \"--orientcenters\") {\n optionlist.push(\"orientcenters\", true);\n } else if (option === \"--puzzleorientation\") {\n optionlist.push(\"puzzleorientation\", process.argv[argp]);\n argp++;\n } else {\n throw new Error(`Bad option: ${option}`);\n }\n }\n for (const [name, curDesc] of Object.entries(puzzleList)) {\n if (name === process.argv[argp]) {\n desc = curDesc;\n break;\n }\n }\n let puzzleDescription: PuzzleDescription;\n if (showargs) {\n if (pascalcomment) {\n console.log(`(* ${process.argv.join(\" \")} *)`);\n } else {\n console.log(`# ${process.argv.join(\" \")}`);\n }\n }\n if (desc !== undefined) {\n const parsed = parsePuzzleDescription(desc);\n if (parsed === null) {\n throw new Error(\"Could not parse puzzle description!\");\n }\n puzzleDescription = parsed;\n argp++;\n } else {\n const cuts: PuzzleCutDescription[] = [];\n const cutarg = argp++;\n while (argp + 1 < process.argv.length && process.argv[argp].length === 1) {\n // TODO: validate cut type\n cuts.push({\n cutType: process.argv[argp] as ExperimentalPuzzleCutType,\n distance: parseFloat(process.argv[argp + 1]),\n });\n argp += 2;\n }\n // TODO: validate shape\n puzzleDescription = {\n shape: process.argv[cutarg] as ExperimentalPuzzleBaseShape,\n cuts,\n };\n }\n const options = parsePGOptionList(optionlist);\n const pg = new PuzzleGeometry(puzzleDescription, options);\n pg.allstickers();\n pg.genperms();\n if (argp < process.argv.length) {\n throw new Error(\"Unprocessed content at end of command line\");\n }\n if (dogap) {\n console.log(pg.writegap());\n } else if (domathematica) {\n console.log(pg.writemathematica());\n } else if (doksolve) {\n console.log(pg.writeksolve()); // TODO: Update arguments\n } else if (dosvg) {\n console.log(pg.generatesvg(undefined, undefined, undefined, do3d));\n } else if (do3d) {\n console.log(JSON.stringify(pg.get3d()));\n } else if (doss) {\n pg.writeSch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C1B;AAAA,IACF;AAAA,EACF;AACA,QAAM,UAAU,kBAAkB,UAAU;AAC5C,QAAM,KAAK,IAAI,eAAe,mBAAmB,OAAO;AACxD,KAAG,YAAY;AACf,KAAG,SAAS;AACZ,MAAI,OAAO,QAAQ,KAAK,QAAQ;AAC9B,UAAM,IAAI,MAAM,4CAA4C;AAAA,EAC9D;AACA,MAAI,OAAO;AACT,YAAQ,IAAI,GAAG,SAAS,CAAC;AAAA,EAC3B,WAAW,eAAe;AACxB,YAAQ,IAAI,GAAG,iBAAiB,CAAC;AAAA,EACnC,WAAW,UAAU;AACnB,YAAQ,IAAI,GAAG,YAAY,CAAC;AAAA,EAC9B,WAAW,OAAO;AAChB,YAAQ,IAAI,GAAG,YAAY,QAAW,QAAW,QAAW,IAAI,CAAC;AAAA,EACnE,WAAW,MAAM;AACf,YAAQ,IAAI,KAAK,UAAU,GAAG,MAAM,CAAC,CAAC;AAAA,EACxC,WAAW,MAAM;AACf,OAAG,kBAAkB,QAAQ,GAAG;AAAA,EAClC,WAAW,SAAS;AAClB,OAAG,UAAU,CAAC,MAAM,QAAQ,IAAI,CAAC,CAAC;AAAA,EACpC;AACF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,115 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/bin/scramble.ts
4
+ import yargs from "yargs";
5
+ import { eventInfo } from "cubing/puzzles";
6
+ import { randomScrambleForEvent } from "cubing/scramble";
7
+ import { setSearchDebug } from "cubing/search";
8
+ import { hideBin } from "yargs/helpers";
9
+ var argv = await yargs(
10
+ // TODO: `hideBin` just shows `bun` in `bun`.
11
+ hideBin(process.argv)
12
+ ).parserConfiguration({
13
+ // Workaround for https://github.com/yargs/yargs/issues/2359
14
+ "parse-positional-numbers": false
15
+ }).option("amount", {
16
+ describe: "Output format.",
17
+ default: 1,
18
+ type: "number",
19
+ alias: "n"
20
+ }).option("format", {
21
+ describe: "Output format.",
22
+ choices: ["text", "link", "json-text"],
23
+ alias: "f"
24
+ }).positional("eventID", {
25
+ describe: "WCA or unofficial event ID",
26
+ type: "string"
27
+ }).version(false).demand(1).strict().argv;
28
+ var eventID = argv._[0];
29
+ setSearchDebug({ logPerf: false, showWorkerInstantiationWarnings: false });
30
+ function scrambleText(scramble) {
31
+ return scramble.toString();
32
+ }
33
+ function scrambleLink(scramble) {
34
+ const url = new URL("https://alpha.twizzle.net/edit/");
35
+ const puzzleID = eventInfo(eventID)?.puzzleID;
36
+ puzzleID && url.searchParams.set("puzzle", puzzleID);
37
+ url.searchParams.set("alg", scramble.toString());
38
+ return url.toString();
39
+ }
40
+ var JSONListPrinter = class {
41
+ #finished = false;
42
+ #firstValuePrintedAlready = false;
43
+ constructor() {
44
+ process.stdout.write("[\n ");
45
+ }
46
+ push(value) {
47
+ if (this.#firstValuePrintedAlready) {
48
+ process.stdout.write(",\n ");
49
+ }
50
+ this.#firstValuePrintedAlready = true;
51
+ process.stdout.write(JSON.stringify(value));
52
+ }
53
+ finish() {
54
+ if (this.#finished) {
55
+ throw new Error("Tried to finish JSON list printing multiple times.");
56
+ }
57
+ this.#finished = true;
58
+ console.log("\n]");
59
+ }
60
+ };
61
+ if (argv.format !== "json-text" && argv.amount === 1) {
62
+ const scramble = await randomScrambleForEvent(eventID);
63
+ switch (argv.format) {
64
+ case "text": {
65
+ console.log(scrambleText(scramble));
66
+ break;
67
+ }
68
+ case "link": {
69
+ console.log(scrambleLink(scramble));
70
+ break;
71
+ }
72
+ case "json-text": {
73
+ throw new Error(
74
+ "Encountered `json` format in code that is not expected to handle it."
75
+ );
76
+ }
77
+ default: {
78
+ console.log(`${scrambleText(scramble)}
79
+
80
+ \u{1F517} ${scrambleLink(scramble)}`);
81
+ }
82
+ }
83
+ } else {
84
+ const jsonListPrinter = argv.format === "json-text" ? new JSONListPrinter() : void 0;
85
+ for (let i = 0; i < argv.amount; i++) {
86
+ const scramble = await randomScrambleForEvent(eventID);
87
+ switch (argv.format) {
88
+ case "text": {
89
+ console.log(`// Scramble #${i + 1}`);
90
+ console.log(`${scrambleText(scramble)}
91
+ `);
92
+ break;
93
+ }
94
+ case "link": {
95
+ console.log(`// Scramble #${i + 1}`);
96
+ console.log(`${scrambleLink(scramble)}
97
+ `);
98
+ break;
99
+ }
100
+ case "json-text": {
101
+ jsonListPrinter?.push(scramble.toString());
102
+ break;
103
+ }
104
+ default: {
105
+ console.log(`// Scramble #${i + 1}
106
+ ${scrambleText(scramble)}
107
+
108
+ \u{1F517} ${scrambleLink(scramble)}
109
+ `);
110
+ }
111
+ }
112
+ }
113
+ jsonListPrinter?.finish();
114
+ }
115
+ //# sourceMappingURL=scramble.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/bin/scramble.ts"],
4
+ "sourcesContent": ["// To run this file directly:\n// bun run src/bin/scramble.ts -- 333\n\nimport yargs from \"yargs\";\nimport { eventInfo } from \"cubing/puzzles\";\nimport { randomScrambleForEvent } from \"cubing/scramble\";\nimport { setSearchDebug } from \"cubing/search\";\nimport { hideBin } from \"yargs/helpers\";\nimport type { Alg } from \"cubing/alg\";\n\n// TODO: completions for `bash`, `zsh`, and `fish`: https://github.com/loilo/completarr\n\n// @ts-ignore: Top-level await is okay because this is not part of the main library.\nconst argv = await yargs(\n // TODO: `hideBin` just shows `bun` in `bun`.\n hideBin(process.argv),\n)\n .parserConfiguration({\n // Workaround for https://github.com/yargs/yargs/issues/2359\n \"parse-positional-numbers\": false,\n })\n .option(\"amount\", {\n describe: \"Output format.\",\n default: 1,\n type: \"number\",\n alias: \"n\",\n })\n .option(\"format\", {\n describe: \"Output format.\",\n choices: [\"text\", \"link\", \"json-text\"],\n alias: \"f\",\n })\n .positional(\"eventID\", {\n describe: \"WCA or unofficial event ID\",\n type: \"string\",\n })\n .version(false) // TODO: why doesn't `yargs` get the right version in `bun` or for the `dist` bin?\n .demand(1)\n .strict().argv;\n\nconst eventID = argv._[0] as string;\n\nsetSearchDebug({ logPerf: false, showWorkerInstantiationWarnings: false });\n\nfunction scrambleText(scramble: Alg): string {\n return scramble.toString();\n}\n\nfunction scrambleLink(scramble: Alg): string {\n const url = new URL(\"https://alpha.twizzle.net/edit/\");\n const puzzleID = eventInfo(eventID)?.puzzleID;\n puzzleID && url.searchParams.set(\"puzzle\", puzzleID);\n url.searchParams.set(\"alg\", scramble.toString());\n return url.toString();\n}\n\nclass JSONListPrinter<T> {\n #finished = false;\n #firstValuePrintedAlready = false;\n constructor() {\n process.stdout.write(\"[\\n \");\n }\n\n push(value: T) {\n if (this.#firstValuePrintedAlready) {\n process.stdout.write(\",\\n \");\n }\n this.#firstValuePrintedAlready = true;\n process.stdout.write(JSON.stringify(value));\n }\n\n finish() {\n if (this.#finished) {\n throw new Error(\"Tried to finish JSON list printing multiple times.\");\n }\n this.#finished = true;\n console.log(\"\\n]\");\n }\n}\n\nif (argv.format !== \"json-text\" && argv.amount === 1) {\n // @ts-ignore: Top-level await is okay because this is not part of the main library.\n const scramble = await randomScrambleForEvent(eventID);\n\n switch (argv.format) {\n case \"text\": {\n console.log(scrambleText(scramble));\n break;\n }\n case \"link\": {\n console.log(scrambleLink(scramble));\n break;\n }\n case \"json-text\": {\n throw new Error(\n \"Encountered `json` format in code that is not expected to handle it.\",\n );\n }\n default: {\n console.log(`${scrambleText(scramble)}\n\n\uD83D\uDD17 ${scrambleLink(scramble)}`);\n }\n }\n} else {\n const jsonListPrinter: JSONListPrinter<string> | undefined =\n argv.format === \"json-text\" ? new JSONListPrinter() : undefined;\n for (let i = 0; i < argv.amount; i++) {\n // @ts-ignore: Top-level await is okay because this is not part of the main library.\n const scramble = await randomScrambleForEvent(eventID);\n switch (argv.format) {\n case \"text\": {\n console.log(`// Scramble #${i + 1}`);\n console.log(`${scrambleText(scramble)}\\n`);\n break;\n }\n case \"link\": {\n console.log(`// Scramble #${i + 1}`);\n console.log(`${scrambleLink(scramble)}\\n`);\n break;\n }\n case \"json-text\": {\n jsonListPrinter?.push(scramble.toString());\n break;\n }\n default: {\n console.log(`// Scramble #${i + 1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AAS,SAAS,CAAC;AACzC;AAAA,MACF;AAAA,MACA,SAAS;AACP,gBAAQ,IAAI,gBAAgB,IAAI,CAAC;AAAA,EACvC,aAAa,QAAQ,CAAC;AAAA;AAAA,YAEnB,aAAa,QAAQ,CAAC;AAAA,CAC1B;AAAA,MACK;AAAA,IACF;AAAA,EACF;AACA,mBAAiB,OAAO;AAC1B;",
6
+ "names": []
7
+ }
@@ -545,4 +545,4 @@ declare class KPattern {
545
545
  }): boolean;
546
546
  }
547
547
 
548
- export { KPattern as K, PuzzleGeometry as P, Quat as Q, StickerDat as S, KPuzzle as a, KPuzzleDefinition as b, KPatternData as c, KPatternOrbitData as d, KTransformationData as e, KTransformationOrbitData as f, KTransformation as g, PuzzleDescriptionString as h, Perm as i, getPuzzleDescriptionString as j, getPuzzleGeometryByDesc as k, getPuzzleGeometryByName as l, getPG3DNamedPuzzles as m, StickerDatAxis as n, StickerDatFace as o, parsePuzzleDescription as p, StickerDatSticker as q, parseOptions as r, PGNotation as s, PuzzleCutDescription as t, PuzzleDescription as u, PUZZLE_CUT_TYPES as v, PuzzleCutType as w, PUZZLE_BASE_SHAPES as x, PuzzleBaseShape as y };
548
+ export { KPattern as K, PuzzleGeometry as P, Quat as Q, StickerDat as S, KPuzzle as a, KPuzzleDefinition as b, KPatternData as c, KPatternOrbitData as d, KTransformationData as e, KTransformationOrbitData as f, KTransformation as g, PuzzleDescriptionString as h, Perm as i, getPuzzleDescriptionString as j, getPuzzleGeometryByDesc as k, getPuzzleGeometryByName as l, getPG3DNamedPuzzles as m, StickerDatAxis as n, StickerDatFace as o, parsePuzzleDescription as p, StickerDatSticker as q, parseOptions as r, PuzzleGeometryOptions as s, PGNotation as t, PuzzleCutDescription as u, PuzzleDescription as v, PUZZLE_CUT_TYPES as w, PuzzleCutType as x, PUZZLE_BASE_SHAPES as y, PuzzleBaseShape as z };
@@ -1,7 +1,7 @@
1
1
  import { Texture, Object3D, Raycaster, PerspectiveCamera, Scene, WebGLRenderer } from 'three';
2
2
  import { g as PuzzleSpecificSimplifyOptions, M as Move, a as Alg, P as Pause, h as AppendCancelOptions, d as AlgLeaf, b as AppendOptions, A as AlgNode, I as IterationDirection } from './Alg-c6770822.js';
3
3
  import { P as Parsed } from './parseAlg-d2c83795.js';
4
- import { a as KPuzzle, P as PuzzleGeometry, K as KPattern, g as KTransformation, h as PuzzleDescriptionString } from './KPattern-12e23b1f.js';
4
+ import { a as KPuzzle, P as PuzzleGeometry, K as KPattern, g as KTransformation, h as PuzzleDescriptionString } from './KPattern-60960997.js';
5
5
 
6
6
  type FaceletMeshStickeringMask = "regular" | "dim" | "oriented" | "ignored" | "invisible";
7
7
  type FaceletStickeringMask = {
@@ -18,7 +18,7 @@ import {
18
18
  functionFromTraversal,
19
19
  keyToMove,
20
20
  setAlgDebug
21
- } from "../chunk-ULQMFOA2.js";
21
+ } from "../chunks/chunk-7X47IY3P.js";
22
22
  export {
23
23
  Alg,
24
24
  AlgBuilder,
@@ -1,6 +1,6 @@
1
- import { K as KPattern } from '../KPattern-12e23b1f.js';
2
- import { B as BluetoothPuzzle } from '../bluetooth-puzzle-91e73b7f.js';
3
- export { B as BluetoothPuzzle, A as MoveEvent, O as OrientationEvent } from '../bluetooth-puzzle-91e73b7f.js';
1
+ import { K as KPattern } from '../KPattern-60960997.js';
2
+ import { B as BluetoothPuzzle } from '../bluetooth-puzzle-c3224834.js';
3
+ export { B as BluetoothPuzzle, A as MoveEvent, O as OrientationEvent } from '../bluetooth-puzzle-c3224834.js';
4
4
  import { a as Alg, M as Move } from '../Alg-c6770822.js';
5
5
 
6
6
  declare function enableDebugLogging(enable: boolean): void;