Pass Creep Pointer into Game.spawns.Spawn1.createCreep



  • Implementation of return codes is certainly more economical that try/catch blocks--and returning a Creep object would break this efficiency.

    However:
    Having exit codes should not preclude passing in callbacks or object pointers, which modifies the reference passed in:

    > var createdCreep = {};
    > Game.spawns.Spawn1.createCreep([WORK, CARRY, MOVE], 'Harvester1', createdCreep);
    

    this would certainly affect performance, code length, etc.