Search in sources :

Example 1 with BWTA

use of bwta.BWTA in project BWAPI4J by OpenBW.

the class MainTest method testBWTA.

private void testBWTA() throws AssertionError {
    BWTA bwta = new BWTA();
    bwta.analyze();
    for (Region region : bwta.getRegions()) {
        System.out.println(region);
        for (Chokepoint choke : region.getChokepoints()) {
            System.out.println("   " + choke);
        }
    }
    TilePosition startLocation = this.bw.getInteractionHandler().self().getStartLocation();
    logger.debug("start location tile: {}", startLocation);
    Region startRegion = bwta.getRegion(startLocation);
    logger.debug("start region: {}", startRegion);
}
Also used : Chokepoint(bwta.Chokepoint) Region(bwta.Region) BWTA(bwta.BWTA)

Example 2 with BWTA

use of bwta.BWTA in project BWAPI4J by OpenBW.

the class TestListener method onStart.

@Override
public void onStart() {
    System.out.println("onStart");
    this.bw.getInteractionHandler().enableUserInput();
    this.bwta = new BWTA();
    this.bwta.analyze();
    System.out.println("analysis done.");
    this.frame = 0;
}
Also used : BWTA(bwta.BWTA)

Aggregations

BWTA (bwta.BWTA)2 Chokepoint (bwta.Chokepoint)1 Region (bwta.Region)1