Skip to content

Commit 018ab29

Browse files
committed
wip
1 parent 2a182cf commit 018ab29

File tree

25 files changed

+191
-788
lines changed

25 files changed

+191
-788
lines changed

bun.lock

Lines changed: 55 additions & 658 deletions
Large diffs are not rendered by default.

packages/demo/demo.json

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1" />
6+
<script type="module" src="./index.ts"></script>
7+
</head>
8+
</html>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import "./menu";
2-
import { createCanvas } from "./canvas";
1+
import "../utils/menu";
2+
import { createCanvas } from "../utils/canvas";
3+
import { grid, snake } from "../utils/sample";
34
import { getBestRoute } from "@snk/solver/getBestRoute";
45
import { Color, copyGrid } from "@snk/types/grid";
5-
import { grid, snake } from "./sample";
66
import { step } from "@snk/solver/step";
77

88
const chain = getBestRoute(grid, snake)!;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1" />
6+
<script type="module" src="./index.ts"></script>
7+
</head>
8+
</html>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import "./menu";
2-
import { createCanvas } from "./canvas";
1+
import "../utils/menu";
2+
import { createCanvas } from "../utils/canvas";
3+
import { grid, snake } from "../utils/sample";
34
import { getSnakeLength } from "@snk/types/snake";
4-
import { grid, snake } from "./sample";
55
import { getColor } from "@snk/types/grid";
66
import { getBestTunnel } from "@snk/solver/getBestTunnel";
77
import { createOutside } from "@snk/solver/outside";

packages/demo/getPathTo/index.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1" />
6+
<script type="module" src="./index.ts"></script>
7+
</head>
8+
</html>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import "./menu";
2-
import { createCanvas } from "./canvas";
1+
import "../utils/menu";
2+
import { createCanvas } from "../utils/canvas";
3+
import { grid, snake as snake0 } from "../utils/sample";
34
import { copySnake, snakeToCells } from "@snk/types/snake";
4-
import { grid, snake as snake0 } from "./sample";
55
import { getPathTo } from "@snk/solver/getPathTo";
66

77
const { canvas, ctx, draw, getPointedCell, highlightCell } = createCanvas(grid);
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1" />
6+
<script type="module" src="./index.ts"></script>
7+
</head>
8+
</html>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import "./menu";
2-
import { createCanvas } from "./canvas";
1+
import "../utils/menu";
2+
import { createCanvas } from "../utils/canvas";
3+
import { grid, snake } from "../utils/sample";
34
import { createSnakeFromCells, snakeToCells } from "@snk/types/snake";
4-
import { grid, snake } from "./sample";
55
import { getPathToPose } from "@snk/solver/getPathToPose";
66

77
const { canvas, ctx, draw, highlightCell } = createCanvas(grid);

0 commit comments

Comments
 (0)