Day 6 part 1.

This commit is contained in:
Anna Rose Wiggins 2018-12-06 02:23:45 -05:00
parent 6185736ef6
commit 0c96d7dded
No known key found for this signature in database
GPG key ID: 8D9ACA841015C59A
2 changed files with 134 additions and 0 deletions

23
2018/day06-1.go Normal file
View file

@ -0,0 +1,23 @@
package main
import (
"fmt"
"internal/coords"
"internal/util"
)
func main() {
data := util.ReadInput()
points := coords.ParsePoints(data)
coords.ComputeRectilinearAreas(points)
biggest := points[0]
for _, point := range points {
if point.RectArea > biggest.RectArea {
biggest = point
}
}
fmt.Println(biggest.RectArea)
}