🚿 clean up

This commit is contained in:
platane
2020-07-20 22:37:58 +02:00
parent 7377068a9a
commit dd23c1630e
11 changed files with 114 additions and 126 deletions

View File

@@ -1,5 +1,5 @@
import { createGif } from "..";
import { generateGrid } from "@snk/compute/generateGrid";
import { generateRandomGrid } from "@snk/compute/generateGrid";
import { computeBestRun } from "@snk/compute";
const drawOptions = {
@@ -17,7 +17,7 @@ const gameOptions = { maxSnakeLength: 5 };
const gifOptions = { delay: 200 };
it("should generate gif", async () => {
const grid = generateGrid(14, 7, { colors: [1, 2, 3, 4], emptyP: 3 });
const grid = generateRandomGrid(14, 7, { colors: [1, 2, 3, 4], emptyP: 3 });
const snake = [
{ x: 4, y: -1 },

View File

@@ -1,5 +1,5 @@
import { createGif } from "..";
import { generateGrid } from "@snk/compute/generateGrid";
import { generateRandomGrid } from "@snk/compute/generateGrid";
import { computeBestRun } from "@snk/compute";
const drawOptions = {
@@ -16,7 +16,7 @@ const gameOptions = { maxSnakeLength: 5 };
const gifOptions = { delay: 20 };
const grid = generateGrid(42, 7, { colors: [1, 2, 3, 4], emptyP: 3 });
const grid = generateRandomGrid(42, 7, { colors: [1, 2, 3, 4], emptyP: 3 });
const snake = [
{ x: 4, y: -1 },

View File

@@ -7,7 +7,6 @@ import { copySnake } from "@snk/compute/snake";
import { drawWorld } from "@snk/draw/drawWorld";
import { step } from "@snk/compute/step";
import * as tmp from "tmp";
// @ts-ignore
import * as execa from "execa";
export const createGif = async (