Skip to content

Negative adjacency rule? #18

Description

@TheAtomAnt

While exploring this tool I was not yet able to find a 'negative' adjacency rule. I realize that simply not defining a rule would potentially cause it to not apply but in my case I'm not seeing a way to deal with an issue.

            var tile1 = new Tile("█");
            var tile2 = new Tile(" ");

            var model = new AdjacentModel(directions: DirectionSet.Cartesian2d);
            var tiles = new[] { tile1, tile2 };

            model.AddAdjacency(tiles, tiles, 1, 0, 0);
            model.AddAdjacency(tiles, tiles, 0, 1, 0);

            model.SetFrequency(tile1, 1);
            model.SetFrequency(tile2, .25);

What I'd like to see is a way to disable diagonal directions. Not sure if this is possible with the way the adjacency system is designed but I'll continue exploring. Currently I'm building a quick and dirty constraint to deal with this - though extending the connected constraint might be the better way to go.

Just wondering about the adjacency system and if I'm missing a negative rule, or the ability to remove a previously configured rule.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions