From 7e1bccde237dacbfb1a190cf3aafc21674722095 Mon Sep 17 00:00:00 2001 From: "nuo.o" <49533950+nuoxoxo@users.noreply.github.com> Date: Wed, 20 Sep 2023 20:50:48 +0200 Subject: [PATCH] Update Aoc1608.tsx --- src/includes/Aoc1608.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/includes/Aoc1608.tsx b/src/includes/Aoc1608.tsx index 44603ac..698b655 100644 --- a/src/includes/Aoc1608.tsx +++ b/src/includes/Aoc1608.tsx @@ -20,6 +20,7 @@ var Aoc1608 = () => { const [p2Traces, setP2Traces] = useState([]) const handleData = async () => { + try { const raws = isTest ? ['rect 3x2', 'rotate column x=1 by 1', 'rotate row y=0 by 4', 'rotate column x=1 by 1'] @@ -32,7 +33,6 @@ var Aoc1608 = () => { const Solver = () => { - let grid:string[][] = [] let traces:string[][][] = [] let i, j @@ -51,8 +51,6 @@ var Aoc1608 = () => { let arr:string[] = line.split(' ') let cmd = arr[0] // rotate OR rect - - if (cmd === 'rotate') { cmd = arr[1] // columm OR row let pos = parseInt(arr[2].split('=')[1]) // '2' in 'y=2' // BUG found and fixed @@ -92,9 +90,7 @@ var Aoc1608 = () => { let temp:string[] = arr[1].split('x') let a = parseInt(temp[0]) let b = parseInt(temp[1]) - // console.log(line, cmd, a, b) // TEST parsing - i = -1 while (++i < b) { j = -1