From 6b1552d65e40d9fb3b043e50c6b5d509918a7b6c Mon Sep 17 00:00:00 2001 From: David Ashby Date: Mon, 13 Dec 2021 19:10:53 -0500 Subject: [PATCH] don't actually need to do the maxx/maxy check --- 13/main.go | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/13/main.go b/13/main.go index f17e87d..787d826 100644 --- a/13/main.go +++ b/13/main.go @@ -119,19 +119,9 @@ func partTwo() { } } } - // find outer bounds of letters - maxy, maxx := 0, 0 - for p := range points { - if p.y > maxy { - maxy = p.y - } - if p.x > maxx { - maxx = p.x - } - } // print letters - for y := 0; y <= maxy; y++ { - for x := 0; x <= maxx; x++ { + for y := 0; y < 6; y++ { + for x := 0; x < 5*8; x++ { if _, ok := points[point{x: x, y: y}]; ok { fmt.Printf("#") } else {