using System.Collections;
using System.Collections.Generic;
using System.Threading.Tasks;
public static Random random = new Random();
public static void Main()
Anthill anthill = new Anthill();
Thread mainThread = new Thread(anthill.Start);
ArrayList ants = new ArrayList();
ants.Add(new Ant("German Crocodile"));
ants.Add(new Ant("Emil Wikström Arbetsmyranson"));
ants.Add(new Ant("Carl XVI Gustaf"));
ants.Add(new Ant("Hassan Fried Chicken"));
Console.SetCursorPosition(0, 0);
Console.WriteLine("The anthill contains: " + twigs + " twigs");
foreach (Ant ant in ants)
Console.WriteLine("Ant " + ant.Name + (ant.IsCarrying ? " is carrying a twig" : " is searching for a twig"));
for (int i = 0; i < 40; i++)
Console.SetCursorPosition(0, 0);
Console.ForegroundColor = (ConsoleColor) (random.Next(Enum.GetNames(typeof (ConsoleColor)).Length));
Console.WriteLine("Victory, we have successfully built a anthill, now we can blaze it 420 MLG pro omg get shrekt bitchz sm0ke w33d erryday");
public void AddTwig(Twig<int>? twig)
public string Name { get; set; }
public bool IsCarrying { get; set; }
public Twig<int>? TwigCarried { get; set; }
public void DoWork(Anthill anthill)
anthill.AddTwig(TwigCarried);
TwigCarried = new Twig<int>(random.Next(1, 20), random.Next(3, 9));
public Twig(T mass, T length)