Question:
Why is the “Turn” method in my project only running once in the loop? It should run once every loop but it only does once then doesn’t work anymore. Does anyone know why this may be?
Repl link:
https://replit.com/@EliotPotts/BlobAI?v=1
code snippet:
while (true)
{
List<Blobos> blobos = new List<Blobos>();
for (int i = 0; i < 20; i++)
{
blobos.Add(new Blobos());
}
Map.Reset();
currentTurn++;
foreach (Blobos b in blobos)
{
b.Turn();
}
Map.RefreshMap();
Console.WriteLine($"Turn: {currentTurn}");
Console.WriteLine($"Eg Age: {blobos[0].age}");
Thread.Sleep(1000);
}