Day 10 solution

This commit is contained in:
2021-12-10 15:07:12 +00:00
parent 156eb5f2de
commit 8950ee2e3e
7 changed files with 336 additions and 0 deletions

25
ten/main.go Normal file
View File

@@ -0,0 +1,25 @@
package ten
import "fmt"
type Ten struct {
navigation navigation
}
func Init(filepath string) *Ten {
ten := &Ten{
navigation: navigation{},
}
ten.navigation.load(filepath)
ten.navigation.parse()
return ten
}
func (d *Ten) Answer() string {
return fmt.Sprintf("The syntax error score is %d", d.navigation.syntaxScore())
}
func (d *Ten) FollowUp() string {
return fmt.Sprintf("The autoComplete score is %d", d.navigation.autoCompleteScore())
}