private static ModuleConnector GetRandomExitWithTag(Module module, TileTagsEnum tagToMatch)
    {
        var possibleExits = module.GetExits();
        var matchingExits = possibleExits.Where(e => (e.hasTag(tagToMatch)));

        return(Helper.GetRandom <ModuleConnector>(matchingExits.ToArray()));
    }
Example #2
0
 public bool hasTag(TileTagsEnum tag)
 {
     return((tags & tag) != TileTagsEnum.None);
 }