using System.Collections.Generic; using System.Linq; using Godot; public class ResourceDistributor { public static Dictionary resources = ResourceLoader.LoadResourceSymbols(); public static string GetResource(List current) { List diff = resources.Keys.Except(current).ToList(); if (diff.Count <= 0) { return resources.Keys.ToList()[GameData.rand.Next(resources.Keys.Count)]; } else { return diff[GameData.rand.Next(diff.Count)]; } } }