don't actually need to do the maxx/maxy check
This commit is contained in:
parent
6b2abb3ebc
commit
6b1552d65e
14
13/main.go
14
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
|
// print letters
|
||||||
for y := 0; y <= maxy; y++ {
|
for y := 0; y < 6; y++ {
|
||||||
for x := 0; x <= maxx; x++ {
|
for x := 0; x < 5*8; x++ {
|
||||||
if _, ok := points[point{x: x, y: y}]; ok {
|
if _, ok := points[point{x: x, y: y}]; ok {
|
||||||
fmt.Printf("#")
|
fmt.Printf("#")
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user