Skip to content

Ported SSCAIT Observer module to Java and BWMirror API

License

Notifications You must be signed in to change notification settings

Jabbo16/SSCAIT-ObserverModule-BWMirror

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

SSCAIT-ObserverModule-BWMirror

Description

Ported SSCAIT Observer module to Java and BWMirror API.

Tested with BWMirror 2.6 and BWAPI 4.1.2.

Original work:

More information can be found at:

Requirements

Usage

Clone this project and add the source code to a package in your Java bot project:

git clone https://github.com/Jabbo16/SSCAIT-ObserverModule-BWMirror.git

Import and create the CameraModule object:

import cameraModule.CameraModule;
private CameraModule observer;

Call the following methods in your main class at the onStart() method:

//self and game are the Player and Game objects extracted from the Mirror object
observer = new CameraModule(self.getStartLocation().toPosition(), game);
observer.toggle(); //Used to enable the observer, by default is disabled

Call the following method in your main class at the onFrame() method:

//Runs the code determining what the observer should be focusing on and handles camera movement
observer.onFrame();

This method should be called when a unit is completed:

//Is used to inform the observer about unit-creation events
observer.moveCameraUnitCreated(unit);

Releases

No releases published

Packages

No packages published

Languages