diff options
-rw-r--r-- | 19.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -43,13 +43,13 @@ blueprint_ctor(struct blueprint * b, int id, int ore_ore, int clay_ore, struct material { - long amount; - long robots; + int amount; + int robots; }; void -material_ctor(struct material * m, long amount, long robots) +material_ctor(struct material * m, int amount, int robots) { m->amount = amount; m->robots = robots; @@ -194,7 +194,7 @@ inventory_build_basic(struct inventory * i, struct blueprint const * b, int rema inventory_tick(i); - fprintf(stderr, "Blueprint %d tick %d, ore: %ld/%ld, clay %ld/%ld, bsdn %ld/%ld, geod %ld/%ld\n", + fprintf(stderr, "Blueprint %d tick %d, ore: %d/%d, clay %d/%d, bsdn %d/%d, geod %d/%d\n", b->id, t + 1, i->ore.amount, i->ore.robots, i->clay.amount, i->clay.robots, @@ -333,7 +333,7 @@ main(int argc, char ** argv) else if (strcmp(build, "exhaustive") == 0) { exhaustive_iter = 0; inventory_build_exhaustive(&i, &b, rounds); - fprintf(stdout, "Blueprint %d, iterations %ld, ore %ld/%ld, clay %ld/%ld, bsdn %ld/%ld, geod %ld/%ld\n", + fprintf(stdout, "Blueprint %d, iterations %ld, ore %d/%d, clay %d/%d, bsdn %d/%d, geod %d/%d\n", b.id, exhaustive_iter, i.ore.amount, i.ore.robots, i.clay.amount, i.clay.robots, @@ -346,7 +346,7 @@ main(int argc, char ** argv) return -1; } - printf("Blueprint %d geodes = %ld\n", b.id, i.geod.amount); + printf("Blueprint %d geodes = %d\n", b.id, i.geod.amount); } regfree(&reblueprint); |