Пример #1
0
        protected override void SolvePartOne()
        {
            uint target            = ~(uint)0 >> 6;
            var  initialSearchNode = new MazeSearchNode(0, "@", target, this, 0);
            var  result            = Search <HeapPriorityQueue <SearchNode> > .Execute(initialSearchNode);

            resultPartOne = result.cost.ToString();
        }
Пример #2
0
 public MazeSearchNode(uint keyring, string location, uint target, Solver environment, int cost, MazeSearchNode parent = null) : base(cost, parent)
 {
     this.keyring     = keyring;
     this.location    = location;
     this.target      = target;
     this.environment = environment;
     missingKeys      = target ^ keyring;
 }