Exemple #1
0
        /// <summary>
        /// Gets the tile that has been decided at a given index.
        /// Otherwise returns undecided or contradiction as appropriate.
        /// </summary>
        public Tile GetTile(int index, Tile undecided = default, Tile contradiction = default)
        {
            tileModelMapping.GetTileCoordToPatternCoord(index, out var patternIndex, out var o);
            var pattern = wavePropagator.GetDecidedPattern(patternIndex);

            if (pattern == (int)Resolution.Undecided)
            {
                return(undecided);
            }
            else if (pattern == (int)Resolution.Contradiction)
            {
                return(contradiction);
            }
            else
            {
                return(tileModelMapping.PatternsToTilesByOffset[o][pattern]);
            }
        }