Convert Mirror.startGame to Java code #2
Loading…
Reference in a new issue
No description provided.
Delete branch "startgame_redo"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Converts the majority of functionality that was formerly in the JNI code for Mirror.startGame to Java code. Unfortunately I had to leave the BWAPI
Event
processing code as JNI code due to bugs with the generator projects ability to parse and emit mirrors for C++enum
types and methods using those enum types (it's seriously pretty broken actually).In addition,
startGame
now takes a boolean parameter which controls if the mainwhile
loop runs indefinitely or not. Running indefinitely is the old behaviour wherestartGame
blocks and you are forced to call something likeSystem.exit
to quit.Passing
false
will make it sostartGame
returns after the match ends (regardless of what the reason for it ending was). Before returning, the BWAPI connection to Broodwar is disconnected.startGame
can be called any number of times to run multiple matches in a row, but the important thing is that this makes it far easier to exactly control this type of thing from the calling code. Hooray!