Ejemplo n.º 1
0
 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];
 }
Ejemplo n.º 2
0
        /// <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);
        }