Day 16 first attempt. Not working yet

This commit is contained in:
2021-12-17 04:03:28 +00:00
parent c8b291bcb8
commit 719c895220
6 changed files with 403 additions and 0 deletions

25
sixteen/main.go Normal file
View File

@@ -0,0 +1,25 @@
package sixteen
import "fmt"
type Sixteen struct {
bits packet
}
func Init(filepath string) *Sixteen {
sixteen := &Sixteen{
bits: packet{},
}
sixteen.bits = load(filepath)
return sixteen
}
func (d *Sixteen) Answer() string {
return fmt.Sprintf("The sum of the version numbers is %d", d.bits.versionSum())
}
func (d *Sixteen) FollowUp() string {
return "sixteen part 2 answer for bits"
}