Convert Mirror.startGame to Java code #2

Merged
gered merged 4 commits from startgame_redo into master 2017-04-12 22:01:32 -04:00
gered commented 2017-04-12 22:00:15 -04:00 (Migrated from github.com)

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 main while loop runs indefinitely or not. Running indefinitely is the old behaviour where startGame blocks and you are forced to call something like System.exit to quit.

Passing false will make it so startGame 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!

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 main `while` loop runs indefinitely or not. Running indefinitely is the old behaviour where `startGame` blocks and you are forced to call something like `System.exit` to quit. Passing `false` will make it so `startGame` 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!
This repo is archived. You cannot comment on pull requests.
No reviewers
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: gered/BWMirror-Generator#2
No description provided.