Пример #1
0
def spawnMouseAnts():
    global spawnAnts
    global pos
    if(spawnAnts):
        spawnedAnt = Ant()
        spawnedAnt.setPos(pos[0], pos[1], map)
        antList.append(spawnedAnt)
Пример #2
0
def spawnBlueAnts():
    global spawnBlueAnts
    global pos
    if(spawnBAnts):
        spawnedBlueAnt = Ant()
        spawnedBlueAnt.setPos(pos[0], pos[1], map)
        spawnedBlueAnt.setFaction("blue")
        spawnedBlueAnt.setColor()
        antList.append(spawnedBlueAnt)
Пример #3
0
def spawnGreenAnts():
    global spawnGreenAnts
    global pos
    if(spawnGAnts):
        spawnedGreenAnt = Ant()
        spawnedGreenAnt.setPos(pos[0], pos[1], map)
        spawnedGreenAnt.setFaction("green")
        spawnedGreenAnt.setColor()
        antList.append(spawnedGreenAnt)
Пример #4
0
def spawnRedAnts():
    global spawnRedAnts
    global pos
    if(spawnRAnts):
        spawnedRedAnt = Ant()
        spawnedRedAnt.setPos(pos[0], pos[1], map)
        spawnedRedAnt.setFaction("red")
        spawnedRedAnt.setColor()
        antList.append(spawnedRedAnt)
Пример #5
0
def spawn_test_ants():
    redLocation = [100, 100]
    greenLocation = [120, 120]
    
    redAnt = Ant()
    redAnt.setFaction("red")
    redAnt.setColor()
    redAnt.health = 25
    redAnt.setPos(redLocation[0], redLocation[1], map)
    antList.append(redAnt)
    
    greenAnt = Ant()
    greenAnt.setFaction("green")
    greenAnt.setColor()
    greenAnt.health = 100
    greenAnt.setPos(greenLocation[0], greenLocation[1], map)
    antList.append(greenAnt)