Example #1
0
        protected Dispatchee(Coordinate coordinates, DispatchRegistry registry)
        {
            Coordinates = coordinates;
            Registry    = registry;

            UniqueId = Registry.Register(this);

            RegisterActions();
        }
Example #2
0
        internal void Compact(Maze maze, int level)
        {
            foreach (var dispatchee in _registry.Dispatchees)
            {
                var uniqueId = dispatchee.UniqueId;
                if (maze.IsInMaze(uniqueId))
                {
                    continue;
                }

                _registry.Unregister(uniqueId);
            }

            maze.UniqueId = Maze.DispatcheeName + level;
            _registry.Register(maze);
        }