Cleaned up project with better structure.

This commit is contained in:
2026-05-09 11:29:48 +02:00
parent 1ad3454f6a
commit 6708aa277f
95 changed files with 711 additions and 700 deletions
+33
View File
@@ -0,0 +1,33 @@
using System.Collections.Generic;
using Godot;
public class ResourceDistributor
{
public static Dictionary<string, Texture2D> resources = ResourceLoader.LoadResourceSymbols();
public static string GetResource(List<string> current)
{
List<string> availableResources = GetUnusedResources(current);
if (availableResources.Count <= 0)
{
availableResources = new List<string>(resources.Keys);
}
return availableResources[GameData.rand.Next(availableResources.Count)];
}
private static List<string> GetUnusedResources(List<string> current)
{
List<string> result = new List<string>();
foreach (string resource in resources.Keys)
{
if (!current.Contains(resource))
{
result.Add(resource);
}
}
return result;
}
}