Giter VIP home page Giter VIP logo

bonzai's People

Contributors

bonzaiferroni avatar lexxicon avatar mikiones avatar sparr avatar trebbettes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bonzai's Issues

disable the `TradeNetwork` by default or clear out default`TradePartners` list

The TradeNetwork should either be disabled by default or the TradePartners list should be empty in this public repository. The reasons are simple-

  • Some players may not realize they are automatically sharing their resources with other players. An "opt-in" system would be more fair, as it would prevent the people on the TradePartner list from essentially profiting off the ignorance of other players who have not read the entire code base.

  • The current setup means that non-coding players, and even zombie players, using this AI provide an unfair advantage to the people in the default TradePartners list.

Disabling it by default could be as simple as requiring a constant to be set to true or having a memory point set to toggle this.

Wiping memory with a room with more than one spawn

When wiping memory more than one spawn in a room results in that room not finding the centerPosition.

It looks like in the initWithSpawn() in the ControllerOperations.ts is only looking for one spawn.

There should be a way to find the center of what is already built after a memory wipe. As in the distance from the top most structure to the bottom most, or left most and right most. This would assume there isn't some random road or something inline with the spawns.

Edit: Also great code. Very elegant and readable. ๐Ÿ‘

headCount function: roleArray seems to sometimes return an empty array even if there are creeps

Misson.ts: function headCount

I found this through UpgradeMission.ts: Line 129 and this.linkUpgraders is sometimes an empty array even if there where upgraders already spawned.

Adding this to above return roleArray; line 119 of Mission.ts

if(roleName == "upgrader"){
    console.log(`Test ${roleArray}`);
}

Gets this:

[1:34:36 PM]Test
[1:34:36 PM]Test
[1:34:36 PM]Test [creep uBase1_upgrader_38]
[1:34:36 PM]Test [creep zBase1_upgrader_24],[creep zBase1_upgrader_57]

Upgraders are spawned for the two lines that don't have creeps, but they don't take further actions once spawned.

Nesting profiler calls

Cpu time does not seem to be tracked properly when nesting profiler calls like so:

profiler.start("AllCreeps");
    profiler.start("FooCreeps");
    profiler.end("FooCreeps");

    profiler.start("BarCreeps");
    profiler.end("BarCreeps");
profiler.end("AllCreeps");

A potential fix could be to store the cpu per identifier
ex: profiler.ts start() would do this:

if(!this[identifier]) this[identifier] = {};
this[identifier].cpu = Game.cpu.getUsed();

instead of this:
this.cpu = Game.cpu.getUsed();

Typescript Lint Errors

I recently ran the TypeScript lint task, and it mentioned about 1700 errors.

Will you be accepting patches to fix these sorts of things? I can create pull requests that will only fix lint problems, and keep separate any new functionality or bug fixes that I have planned.

If you're not interested, you can just close this issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.