solve Day18 in Rust

This commit is contained in:
2023-12-18 18:05:55 +01:00
parent 65424cea56
commit bfea3d7501
5 changed files with 130 additions and 20 deletions

View File

@@ -14,7 +14,7 @@ function parseInstructions(filePath: string): string[] {
function calculateArea(lines: string[]): number {
const DIRECTIONS: [number, number][] = [[0, 1], [1, 0], [0, -1], [-1, 0]];
let points: [number, number][] = [[0, 0]];
const points: [number, number][] = [[0, 0]];
let boundary: number = 0;
for (const line of lines) {