INNER CODE UNIT · C

total

acoto87/war1 · src/war_actions.c:29

    s32 total = initCounter[0] + initCounter[1] + initCounter[2];
    s32 counter[] = {initCounter[0] + 1, initCounter[1], initCounter[2]};
    s32 itype = 0;

    s32 res[3][5] = {0};

    for(s32 i = 0; i < total; i++)
    {
        counter[itype]--;

        do
        {
            itype++;
            if (itype == 3) itype = 0;
        } while (counter[itype] <= 0);

        res[itype][initCounter[itype] - counter[itype]] = (i + 1) * nbdir;
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…