Skip to content

Commit 70012af

Browse files
committed
day 5 part 2 simpler than I thought
1 parent 0db14f1 commit 70012af

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

05/main.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,7 @@ type Board struct {
6868
}
6969

7070
func (b *Board) Ingest(l Line) {
71-
if !l.IsHorizontal() && !l.IsVertical() {
72-
// We don't care about horizontal or vertical atm.
73-
return
74-
}
75-
76-
// This is only horizontal and vertical for now, so we just want to walk around
77-
// and fill in the counts at each coordinate the line crosses.
71+
// Since we are only ever moving at 45 degree angles, this should be fine...
7872

7973
var dx, dy int
8074
if l.Start.X < l.End.X {

0 commit comments

Comments
 (0)