INNER CODE UNIT · C

townHall

acoto87/war1 · src/war_ai.c:104

    WarUnitType townHall = wu_getUnitTypeForRace(WAR_UNIT_TOWNHALL_HUMANS, aiPlayer->race);
    WarAICommandListAdd(commands, wai_createUnitRequest(context, aiPlayer, townHall, 1));
    WarAICommandListAdd(commands, wai_createWaitForUnit(context, aiPlayer, townHall, 1));

    WarUnitType worker = wu_getUnitTypeForRace(WAR_UNIT_PEASANT, aiPlayer->race);
    WarAICommandListAdd(commands, wai_createUnitRequest(context, aiPlayer, worker, 2));
    WarAICommandListAdd(commands, wai_createWaitForUnit(context, aiPlayer, worker, 2));
    WarAICommandListAdd(commands, wai_createUnitRequest(context, aiPlayer, worker, 2));
    WarAICommandListAdd(commands, wai_createWaitForUnit(context, aiPlayer, worker, 4));

    ai->customData = customData;
}

WarAICommand* wai_getNextAICommand(WarContext* context, WarPlayerInfo* aiPlayer)
{
    WarAI* ai = aiPlayer->ai;
    assert(ai);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…