adventofcode/2019/day18/main.go

37 lines
599 B
Go

package main
import (
"errors"
helpers "git.bullercodeworks.com/brian/adventofcode/helpers"
)
var maxX, maxY int
var vault map[helpers.Coordinate]byte
var keys map[helpers.Coordinate]byte
var doors map[helpers.Coordinate]byte
func main() {
file := "input"
if helpers.GetArgNumber(1) != "" {
file = helpers.GetArgNumber(1)
}
v := NewVault(file)
v.Print()
}
func isDoor(b byte) bool {
return 'A' <= b && b <= 'Z'
}
func isKey(b byte) bool {
return 'a' <= b && b <= 'z'
}
func keyToDoor(b byte) byte {
return (b - 'a') + 'A'
}
func doorToKey(b byte) byte {
return (b - 'A') + 'a'
}