Documentation ¶
Index ¶
Constants ¶
View Source
const ( CaveStart = "start" CaveEnd = "end" )
Variables ¶
This section is empty.
Functions ¶
func Part1 ¶
func Part1(cs CaveSystem) (int, error)
func Part2 ¶
func Part2(cs CaveSystem) (int, error)
Types ¶
type CaveSystem ¶
func NewCaveSystem ¶
func NewCaveSystem(in []string) (CaveSystem, error)
type SearchNode ¶
type SearchNode struct { CaveSystem CaveSystem Path []string VisitedSmall Caves AllowedSecondVisit bool }
func (*SearchNode) IsGoal ¶
func (n *SearchNode) IsGoal() bool
func (*SearchNode) Key ¶
func (n *SearchNode) Key() interface{}
func (*SearchNode) Neighbours ¶
func (n *SearchNode) Neighbours() ([]bfs.Node, error)
func (*SearchNode) String ¶
func (n *SearchNode) String() string
Click to show internal directories.
Click to hide internal directories.