Partial solution for 10.1. We've got grouping, but still need sorting and some printing cleanup.

This commit is contained in:
Anna Rose Wiggins 2018-12-12 13:18:53 -05:00
parent 06a0886b67
commit e47b6c4a45
No known key found for this signature in database
GPG key ID: 8D9ACA841015C59A
6 changed files with 328 additions and 0 deletions

37
2018/day10-1.go Normal file
View file

@ -0,0 +1,37 @@
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
}
}