Skip to content
Snippets Groups Projects
antsLaunchExample.py 639 B
"""
Class antsLaunchExample
"""
from random import seed

from pyAmakIHM.classes.fenetre import Fenetre
from controleurAntsExample import ControleurAntsExample
from worldExample import WorldExample
from antHillExample import *
from threading import Thread

fenetre = Fenetre("Prototype Ants")

seed()

env = WorldExample(0, fenetre.get_canvas_width(), 0, fenetre.get_canvas_height(), 5, 7)
amas = AntHillExample(env)

controleur = ControleurAntsExample(fenetre, amas)


def run():
    controleur.get_amas().start()


def main():
    controleur.initialisation()
    Thread(target=run).start()
    controleur.get_fenetre().display()


main()