Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zerg ResourceDepots refactor/training functionality, MobileUnit build time, BWEM initalization #63

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion BWAPI4J/src/main/java/bwem/map/MapInitializerImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,13 @@ public void initialize(final boolean enableTimer) {
logger.info("Map::createBases: " + timer.elapsedMilliseconds() + " ms");
timer.reset();
}


assignStartingLocationsToSuitableBases();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function will throw an exception if it fails to match suitable base locations to all starting locations. Lots of maps play around with start locations and observer player starting locations. So, this change breaks more than it fixes, IMO. If the intent of this change is so the user is not required to manually invoke this function during the bot's initialization stages, the thrown exception needs to be removed or dealt with. As something to consider, BWEM generates a list of starting locations not assigned to bases if the function fails.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood, I'll withdraw this proposal. Was just struck by how user-unfriendly it was to have an initialize() then have to manually do something that seems like core functionality, not an option.

if (enableTimer) {
logger.info("Map::assignStartingLocationsToSuitableBases: " + timer.elapsedMilliseconds() + " ms");
timer.reset();
}

// /// bw << "Map::initialize: " << overallTimer.elapsedMilliseconds() << " ms" << endl;
if (enableTimer) {
logger.info("Map::initialize Total: " + overallTimer.elapsedMilliseconds() + " ms");
Expand Down