10 lines
331 B
TypeScript
10 lines
331 B
TypeScript
|
import { toLightMap, lightTrasport, RIGHT, toString, clearLight, countPoweredTile } from "./lightMap.ts";
|
||
|
|
||
|
const input = await Deno.readTextFile("input.txt");
|
||
|
|
||
|
const lightMap = toLightMap(input);
|
||
|
lightTrasport(lightMap, [0, 0], RIGHT);
|
||
|
console.log(toString(lightMap));
|
||
|
|
||
|
const count = countPoweredTile(lightMap);
|
||
|
console.log(count);
|