internal SelectedChangeTracker(TilePropagator tilePropagator, WavePropagator wavePropagator, TileModelMapping tileModelMapping, TilePropagatorTileSet tileSet, IQuadstateChanged onChange) { this.tilePropagator = tilePropagator; this.wavePropagator = wavePropagator; this.tileModelMapping = tileModelMapping; this.tileSet = tileSet; this.onChange = onChange; patternCounts = new int[tilePropagator.Topology.IndexCount]; values = new Quadstate[tilePropagator.Topology.IndexCount]; }
/// <summary> /// Returns a tracker that runs a callback when the banned/selected status of tile changes with respect to a tileset. /// </summary> public SelectedChangeTracker CreateSelectedChangeTracker(TilePropagatorTileSet tileSet, IQuadstateChanged onChange) { var tracker = new SelectedChangeTracker(this, wavePropagator, tileModelMapping, tileSet, onChange); ((ITracker)tracker).Reset(); wavePropagator.AddTracker(tracker); return(tracker); }