This commit is contained in:
Brian Buller 2018-12-14 13:01:01 -06:00
parent c96141ea49
commit e60c0a3f8d
1 changed files with 1 additions and 18 deletions

View File

@ -17,7 +17,7 @@ func main() {
if len(os.Args) > 1 {
input = os.Args[1]
}
//part1()
part1()
part2()
}
@ -48,7 +48,6 @@ func part2() {
func tick() {
r1, r2 := getElfRecipes()
//fmt.Println(r1, r2, strconv.Itoa(r1+r2))
sum := []byte(strconv.Itoa(int(r1 - '0' + r2 - '0')))
recipes = append(recipes, sum...)
}
@ -69,22 +68,6 @@ func moveElves() {
}
}
func testForInput() bool {
if len(recipes) < len(input) {
return false
}
for i := 0; i < len(input); i++ {
idx := len(recipes) - len(input) + i
if recipes[idx] != input[i] {
return false
}
//fmt.Println(recipes[idx], "==", inputSlice[i])
}
idx := len(recipes) - len(input)
fmt.Println(recipes[idx:], input)
return true
}
func Atoi(i string) int {
var ret int
var err error