Esempio n. 1
0
        private void PickNextArea_GroupingSetup_RegionalGroupings(out MapGrouping <Region, WorldRegion> grouping, bool castleUnlocked = false)
        {
            IRegionFactory                regionFactory = new RegionFactory(_decisionManager);
            IEnumerable <Region>          regions       = regionFactory.GetRegions(EnumHelperMethods.GetAllValuesForEnum <WorldRegion>());
            MapManager                    mapManager    = new MapManager(Globals.GroupingKeys);
            AreaMap <Region, WorldRegion> regionalMap   = mapManager.GetRegionalMap(regions.ToArray());

            grouping = regionalMap.MapPaths.First(p => p.From.AreaId == WorldRegion.Fields).To;

            if (castleUnlocked)
            {
                grouping.Unlock(r => r.AreaId == WorldRegion.DarkCastle);
            }
        }