static void Main(string[] args) { Console.Write("Debut"); ForetMagique.IGForet ig = new ForetMagique.IGForet(); ForetEnvironnement foret = new ForetEnvironnement(ig); Agent agent = new Agent(foret); Console.Write("ok"); foret.thread.Start(); Application.EnableVisualStyles(); Application.Run(ig); }
public ForetEnvironnement(ForetMagique.IGForet ig) { thread = new Thread(new ThreadStart(ThreadLoop)); zonesForet = new Zone[NbZonesLigne, NbZonesLigne]; this.ig = ig; this.ig.UpdatePanel(NbZonesLigne, NbZonesLigne); posAgentX = 0; posAgentY = 0; Console.WriteLine("Debut Creation Foret"); for (int x = 0; x < NbZonesLigne; x++) { for (int y = 0; y < NbZonesLigne; y++) { zonesForet[y, x] = new Zone(x, y); } } Console.WriteLine("Creation ForetOK"); RemplirForet(); }