Rename shared packages by day instead of vaguely by purpose.

This commit is contained in:
2018-12-10 01:06:47 -05:00
parent 42cb05ba7f
commit 31f60eca0e
22 changed files with 49 additions and 50 deletions

View File

@ -1,4 +1,4 @@
package calibration
package day01
import (
"bufio"

View File

@ -1,5 +1,4 @@
// Used by both parts of day 03
package fabric
package day03
import (
"strconv"

View File

@ -1,4 +1,4 @@
package guards
package day04
import (
"sort"

View File

@ -1,5 +1,5 @@
// Functions for operating on polymers from day 5.
package polymer
package day05
import (
"bytes"

View File

@ -1,4 +1,4 @@
package coords
package day06
import (
"strconv"

View File

@ -1,7 +1,7 @@
// BreadthFirstOrder and its companion functions ended up not giving the
// right solution, but I'm leaving them here as a useful generic tree
// algorithm.
package tree
package day07
func BreadthFirstOrder(root *Node) []*Node {
seen := make(map[rune]bool)

View File

@ -1,4 +1,4 @@
package tree
package day07
func SimulateConstruction(root *Node) int {
working := make(map[rune]*Node)

View File

@ -1,4 +1,4 @@
package tree
package day07
import (
"fmt"

View File

@ -1,4 +1,4 @@
package tree
package day07
// FindOrder determines the correct order according to these rules:
// 1. A node cannot come before all of its parents have been included.

View File

@ -1,4 +1,4 @@
package tree
package day07
import (
"regexp"