protected Dispatchee(Coordinate coordinates, DispatchRegistry registry) { Coordinates = coordinates; Registry = registry; UniqueId = Registry.Register(this); RegisterActions(); }
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); }