You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
388 B
24 lines
388 B
package day12
|
|
|
|
import (
|
|
"strconv"
|
|
|
|
"git.elis.nu/etu/aoc2020/utils"
|
|
)
|
|
|
|
type Instructions struct {
|
|
Char string
|
|
Arg int
|
|
}
|
|
|
|
var rows []Instructions
|
|
|
|
func ParseFile(input string) {
|
|
// Parse file
|
|
for _, line := range utils.GetLinesFromFile("day12/" + input + ".txt") {
|
|
arg, _ := strconv.Atoi(string(line[1:]))
|
|
|
|
rows = append(rows, Instructions{Char: string(line[0]), Arg: arg})
|
|
}
|
|
}
|