adventofcode/2018/day10-1.go

38 lines
473 B
Go

package main
import (
"fmt"
"internal/day10"
"internal/util"
)
func main() {
data := util.ReadInput()
points := day10.ParseInput(data)
i := 0 // debug
for {
for _, point := range points {
point.Move()
}
groups := day10.GroupPoints(points)
if groups != nil {
for _, group := range groups {
day10.DrawPoints(group)
fmt.Println()
}
return
}
// debug
i++
if i > 100000 {
fmt.Println("oops")
return
}
// end debug
}
}