diff --git a/.gitignore b/.gitignore index 6a228a7..8aefe9c 100644 --- a/.gitignore +++ b/.gitignore @@ -218,3 +218,5 @@ pip-log.txt #Mr Developer .mr.developer.cfg +*.log + diff --git a/README.md b/README.md index 084b145..40f6d2e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -BWMirror API +BWMirror API ========= BWMirror API allows you to treat native BWAPI C/C++ objects as if they were Java objects. -The main class of the generator is generator.CJavaPipeline \ No newline at end of file +The main class of the generator is generator.CJavaPipeline diff --git a/bwapi/AIModule.java b/bwapi/AIModule.java deleted file mode 100644 index 13811cb..0000000 --- a/bwapi/AIModule.java +++ /dev/null @@ -1,130 +0,0 @@ -package bwapi; - -import bwapi.BWEventListener; - -/** - * This class receives all events from Broodwar. - * To process them, receive an AIModule's instance from {@link bwapi.Mirror} and call {@link #setEventListener(BWEventListener)} - * to set you own {@link bwapi.BWEventListener listener}. - * There's also a stub class ({@link bwapi.DefaultBWListener}) provided, so you don't have to implement all of the methods. - */ -public class AIModule { - - AIModule(){} - - private BWEventListener eventListener; - - public void setEventListener(BWEventListener eventListener) { - this.eventListener = eventListener; - } - - public void onStart() { - if (eventListener != null) { - eventListener.onStart(); - } - } - - public void onEnd(boolean isWinner) { - if (eventListener != null) { - eventListener.onEnd(isWinner); - } - } - - public void onFrame() { - if (eventListener != null) { - eventListener.onFrame(); - } - } - - public void onSendText(String text) { - if (eventListener != null) - { - eventListener.onSendText(text); - } - } - - public void onReceiveText(Player player, String text) { - if (eventListener != null) { - eventListener.onReceiveText(player, text); - } - } - - public void onPlayerLeft(Player player) { - if (eventListener != null) { - eventListener.onPlayerLeft(player); - } - } - - public void onNukeDetect(Position target) { - if (eventListener != null) { - eventListener.onNukeDetect(target); - } - } - - public void onUnitDiscover(Unit unit) { - if (eventListener != null) { - eventListener.onUnitDiscover(unit); - } - } - - public void onUnitEvade(Unit unit) { - if (eventListener != null) { - eventListener.onUnitEvade(unit); - } - } - - public void onUnitShow(Unit unit) { - if (eventListener != null) { - eventListener.onUnitShow(unit); - } - } - - public void onUnitHide(Unit unit) { - if (eventListener != null) { - eventListener.onUnitHide(unit); - } - } - - public void onUnitCreate(Unit unit) { - if (eventListener != null) { - eventListener.onUnitCreate(unit); - } - } - - public void onUnitDestroy(Unit unit) { - if (eventListener != null) { - eventListener.onUnitDestroy(unit); - } - } - - public void onUnitMorph(Unit unit) { - if (eventListener != null) { - eventListener.onUnitMorph(unit); - } - } - - public void onUnitRenegade(Unit unit) { - if (eventListener != null) { - eventListener.onUnitRenegade(unit); - } - } - - public void onSaveGame(String gameName) { - if (eventListener != null) { - eventListener.onSaveGame(gameName); - } - } - - public void onUnitComplete(Unit unit) { - if (eventListener != null) { - eventListener.onUnitComplete(unit); - } - } - - public void onPlayerDropped(Player player) { - if (eventListener != null) { - eventListener.onPlayerDropped(player); - } - } - -} diff --git a/bwapi/AbstractPoint.java b/bwapi/AbstractPoint.java deleted file mode 100644 index 88c4b74..0000000 --- a/bwapi/AbstractPoint.java +++ /dev/null @@ -1,30 +0,0 @@ -package bwapi; - -/** - * Common ancestor for location based objects to simplify distance computation. - * This will be refactored into interface with default methods when java 8 becomes widely used. - * - * Idea by Rafa³ Poniatowski - */ -public abstract class AbstractPoint { - - public abstract T getPoint(); - - public int getX(){ - return getPoint().getX(); - } - - public int getY(){ - return getPoint().getY(); - } - - public double distanceTo(AbstractPoint otherPosition) { - return distanceTo(otherPosition.getX(), otherPosition.getY()); - } - - public double distanceTo(int x, int y) { - double dx = x - getX(); - double dy = y - getY(); - return Math.sqrt(dx * dx + dy * dy); - } -} \ No newline at end of file diff --git a/bwapi/BWEventListener.java b/bwapi/BWEventListener.java deleted file mode 100644 index 841ec66..0000000 --- a/bwapi/BWEventListener.java +++ /dev/null @@ -1,53 +0,0 @@ -package bwapi; - -import bwapi.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -/** - * Implement this interface and call {@link bwapi.AIModule#setEventListener(bwapi.BWEventListener)} to receive all of the in game events. - */ -public interface BWEventListener { - - public void onStart(); - - public void onEnd(boolean isWinner); - - public void onFrame(); - - public void onSendText(String text); - - public void onReceiveText(Player player, String text); - - public void onPlayerLeft(Player player); - - public void onNukeDetect(Position target); - - public void onUnitDiscover(Unit unit); - - public void onUnitEvade(Unit unit); - - public void onUnitShow(Unit unit); - - public void onUnitHide(Unit unit); - - public void onUnitCreate(Unit unit); - - public void onUnitDestroy(Unit unit); - - public void onUnitMorph(Unit unit); - - public void onUnitRenegade(Unit unit); - - public void onSaveGame(String gameName); - - public void onUnitComplete(Unit unit); - - public void onPlayerDropped(Player player); - -} - - diff --git a/bwapi/Bullet.java b/bwapi/Bullet.java deleted file mode 100644 index 561f255..0000000 --- a/bwapi/Bullet.java +++ /dev/null @@ -1,118 +0,0 @@ -package bwapi; - -import bwapi.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Bullet { - - public int getID() { - return getID_native(pointer); - } - - public Player getPlayer() { - return getPlayer_native(pointer); - } - - public BulletType getType() { - return getType_native(pointer); - } - - public Unit getSource() { - return getSource_native(pointer); - } - - public Position getPosition() { - return getPosition_native(pointer); - } - - public double getAngle() { - return getAngle_native(pointer); - } - - public double getVelocityX() { - return getVelocityX_native(pointer); - } - - public double getVelocityY() { - return getVelocityY_native(pointer); - } - - public Unit getTarget() { - return getTarget_native(pointer); - } - - public Position getTargetPosition() { - return getTargetPosition_native(pointer); - } - - public int getRemoveTimer() { - return getRemoveTimer_native(pointer); - } - - public boolean exists() { - return exists_native(pointer); - } - - public boolean isVisible() { - return isVisible_native(pointer); - } - - public boolean isVisible(Player player) { - return isVisible_native(pointer, player); - } - - - private static Map instances = new HashMap(); - - private Bullet(long pointer) { - this.pointer = pointer; - } - - private static Bullet get(long pointer) { - if (pointer == 0 ) { - return null; - } - Bullet instance = instances.get(pointer); - if (instance == null ) { - instance = new Bullet(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native int getID_native(long pointer); - - private native Player getPlayer_native(long pointer); - - private native BulletType getType_native(long pointer); - - private native Unit getSource_native(long pointer); - - private native Position getPosition_native(long pointer); - - private native double getAngle_native(long pointer); - - private native double getVelocityX_native(long pointer); - - private native double getVelocityY_native(long pointer); - - private native Unit getTarget_native(long pointer); - - private native Position getTargetPosition_native(long pointer); - - private native int getRemoveTimer_native(long pointer); - - private native boolean exists_native(long pointer); - - private native boolean isVisible_native(long pointer); - - private native boolean isVisible_native(long pointer, Player player); - - -} diff --git a/bwapi/BulletType.java b/bwapi/BulletType.java deleted file mode 100644 index e9d8d96..0000000 --- a/bwapi/BulletType.java +++ /dev/null @@ -1,118 +0,0 @@ -package bwapi; - -import bwapi.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class BulletType { - - public String c_str() { - return c_str_native(pointer); - } - - public String toString(){ - return c_str(); - } - - public static BulletType Melee; - - public static BulletType Fusion_Cutter_Hit; - - public static BulletType Gauss_Rifle_Hit; - - public static BulletType C_10_Canister_Rifle_Hit; - - public static BulletType Gemini_Missiles; - - public static BulletType Fragmentation_Grenade; - - public static BulletType Longbolt_Missile; - - public static BulletType ATS_ATA_Laser_Battery; - - public static BulletType Burst_Lasers; - - public static BulletType Arclite_Shock_Cannon_Hit; - - public static BulletType EMP_Missile; - - public static BulletType Dual_Photon_Blasters_Hit; - - public static BulletType Particle_Beam_Hit; - - public static BulletType Anti_Matter_Missile; - - public static BulletType Pulse_Cannon; - - public static BulletType Psionic_Shockwave_Hit; - - public static BulletType Psionic_Storm; - - public static BulletType Yamato_Gun; - - public static BulletType Phase_Disruptor; - - public static BulletType STA_STS_Cannon_Overlay; - - public static BulletType Sunken_Colony_Tentacle; - - public static BulletType Acid_Spore; - - public static BulletType Glave_Wurm; - - public static BulletType Seeker_Spores; - - public static BulletType Queen_Spell_Carrier; - - public static BulletType Plague_Cloud; - - public static BulletType Consume; - - public static BulletType Ensnare; - - public static BulletType Needle_Spine_Hit; - - public static BulletType Invisible; - - public static BulletType Optical_Flare_Grenade; - - public static BulletType Halo_Rockets; - - public static BulletType Subterranean_Spines; - - public static BulletType Corrosive_Acid_Shot; - - public static BulletType Neutron_Flare; - - public static BulletType None; - - public static BulletType Unknown; - - - private static Map instances = new HashMap(); - - private BulletType(long pointer) { - this.pointer = pointer; - } - - private static BulletType get(long pointer) { - if (pointer == 0 ) { - return null; - } - BulletType instance = instances.get(pointer); - if (instance == null ) { - instance = new BulletType(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String c_str_native(long pointer); - - -} diff --git a/bwapi/CenteredObject.java b/bwapi/CenteredObject.java deleted file mode 100644 index dd751b0..0000000 --- a/bwapi/CenteredObject.java +++ /dev/null @@ -1,15 +0,0 @@ -package bwapi; - -import bwapi.Position; - -/** - * Interrmediate class used to translate getPoint() calls to getCenter() calls. - */ -public abstract class CenteredObject extends AbstractPoint { - - public Position getPoint(){ - return getCenter(); - } - - public abstract Position getCenter(); -} \ No newline at end of file diff --git a/bwapi/Client.java b/bwapi/Client.java deleted file mode 100644 index 7ca6341..0000000 --- a/bwapi/Client.java +++ /dev/null @@ -1,58 +0,0 @@ -package bwapi; - -import bwapi.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Client { - - public boolean isConnected() { - return isConnected_native(pointer); - } - - public boolean connect() { - return connect_native(pointer); - } - - public void disconnect() { - disconnect_native(pointer); - } - - public void update() { - update_native(pointer); - } - - - private static Map instances = new HashMap(); - - private Client(long pointer) { - this.pointer = pointer; - } - - private static Client get(long pointer) { - if (pointer == 0 ) { - return null; - } - Client instance = instances.get(pointer); - if (instance == null ) { - instance = new Client(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native boolean isConnected_native(long pointer); - - private native boolean connect_native(long pointer); - - private native void disconnect_native(long pointer); - - private native void update_native(long pointer); - - -} diff --git a/bwapi/Color.java b/bwapi/Color.java deleted file mode 100644 index ab029c8..0000000 --- a/bwapi/Color.java +++ /dev/null @@ -1,73 +0,0 @@ -package bwapi; - -import java.lang.Override; -import java.util.HashMap; -import java.util.Map; - -/** - * Starcraft uses a 256 color palette to render everything, - * so the colors available for draw shapes using BWAPI is limited to the colors available in the Pallete. - * Several predefined colors from the pallete are provided. - */ -public class Color { - - private int r, g, b; - - /** - * Create a color using the color in the palette that is closest to the RGB color specified. This will check a number of colors in the pallet to see which is closest to the specified color so this function is relatively slow. - * @param r - * @param g - * @param b - */ - public Color(int r, int g, int b) { - this.r = r; - this.g = g; - this.b = b; - } - - public static Color Red; - - public static Color Blue; - - public static Color Teal; - - public static Color Purple; - - public static Color Orange; - - public static Color Brown; - - public static Color White; - - public static Color Yellow; - - public static Color Green; - - public static Color Cyan; - - public static Color Black; - - public static Color Grey; - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof Color)) return false; - - Color color = (Color) o; - - if (b != color.b) return false; - if (g != color.g) return false; - if (r != color.r) return false; - - return true; - } - - @Override - public int hashCode() { - int result = r; - result = 31 * result + g; - result = 31 * result + b; - return result; - } -} diff --git a/bwapi/CommandType/Enum.java b/bwapi/CommandType/Enum.java deleted file mode 100644 index 7e20d4e..0000000 --- a/bwapi/CommandType/Enum.java +++ /dev/null @@ -1,44 +0,0 @@ -package bwapi.CommandType; - -import bwapi.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public enum Enum { - - None(0), - SetScreenPosition(1), - PingMinimap(2), - EnableFlag(3), - Printf(4), - SendText(5), - ChangeRace(6), - StartGame(7), - PauseGame(8), - ResumeGame(9), - LeaveGame(10), - RestartGame(11), - SetLocalSpeed(12), - SetLatCom(13), - SetGui(14), - SetFrameSkip(15), - SetMap(16), - SetAllies(17), - SetVision(18), - SetCommandOptimizerLevel(19), - SetReplayVision(20); - - private int value; - - public int getValue(){ - return value; - } - - Enum(int value){ - this.value = value; - } - -} diff --git a/bwapi/CoordinateType/Enum.java b/bwapi/CoordinateType/Enum.java deleted file mode 100644 index f0970d6..0000000 --- a/bwapi/CoordinateType/Enum.java +++ /dev/null @@ -1,26 +0,0 @@ -package bwapi.CoordinateType; - -import bwapi.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public enum Enum { - - Screen(1), - Map(2), - Mouse(3); - - private int value; - - public int getValue(){ - return value; - } - - Enum(int value){ - this.value = value; - } - -} diff --git a/bwapi/DamageType.java b/bwapi/DamageType.java deleted file mode 100644 index 862fc66..0000000 --- a/bwapi/DamageType.java +++ /dev/null @@ -1,58 +0,0 @@ -package bwapi; - -import bwapi.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class DamageType { - - public String c_str() { - return c_str_native(pointer); - } - - public String toString(){ - return c_str(); - } - - public static DamageType Independent; - - public static DamageType Explosive; - - public static DamageType Concussive; - - public static DamageType Normal; - - public static DamageType Ignore_Armor; - - public static DamageType None; - - public static DamageType Unknown; - - - private static Map instances = new HashMap(); - - private DamageType(long pointer) { - this.pointer = pointer; - } - - private static DamageType get(long pointer) { - if (pointer == 0 ) { - return null; - } - DamageType instance = instances.get(pointer); - if (instance == null ) { - instance = new DamageType(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String c_str_native(long pointer); - - -} diff --git a/bwapi/DefaultBWListener.java b/bwapi/DefaultBWListener.java deleted file mode 100644 index 43ad13e..0000000 --- a/bwapi/DefaultBWListener.java +++ /dev/null @@ -1,103 +0,0 @@ -package bwapi; - -import bwapi.BWEventListener; -import bwapi.Player; -import bwapi.Position; -import bwapi.Unit; - -/** - * A utility stub class providing a default implementation of {@link bwapi.BWEventListener}, - * override it's methods if you want to handle only some events. - */ -public class DefaultBWListener implements BWEventListener { - - @Override - public void onStart() { - - } - - @Override - public void onEnd(boolean b) { - - } - - @Override - public void onFrame() { - - } - - @Override - public void onSendText(String s) { - - } - - @Override - public void onReceiveText(Player player, String s) { - - } - - @Override - public void onPlayerLeft(Player player) { - - } - - @Override - public void onNukeDetect(Position position) { - - } - - @Override - public void onUnitDiscover(Unit unit) { - - } - - @Override - public void onUnitEvade(Unit unit) { - - } - - @Override - public void onUnitShow(Unit unit) { - - } - - @Override - public void onUnitHide(Unit unit) { - - } - - @Override - public void onUnitCreate(Unit unit) { - - } - - @Override - public void onUnitDestroy(Unit unit) { - - } - - @Override - public void onUnitMorph(Unit unit) { - - } - - @Override - public void onUnitRenegade(Unit unit) { - - } - - @Override - public void onSaveGame(String s) { - - } - - @Override - public void onUnitComplete(Unit unit) { - - } - - @Override - public void onPlayerDropped(Player player) { - - } -} diff --git a/bwapi/Error.java b/bwapi/Error.java deleted file mode 100644 index db32480..0000000 --- a/bwapi/Error.java +++ /dev/null @@ -1,100 +0,0 @@ -package bwapi; - -import java.util.HashMap; -import java.util.Map; - -/** - * Functions in BWAPI may set an error code. To retrieve the error code, call Game::getLastError. - */ -public class Error { - - private int id; - - private Error(int id) { - this.id = id; - } - - - public static Error Unit_Does_Not_Exist; - - public static Error Unit_Not_Visible; - - public static Error Unit_Not_Owned; - - public static Error Unit_Busy; - - public static Error Incompatible_UnitType; - - public static Error Incompatible_TechType; - - public static Error Incompatible_State; - - public static Error Already_Researched; - - public static Error Fully_Upgraded; - - public static Error Currently_Researching; - - public static Error Currently_Upgrading; - - public static Error Insufficient_Minerals; - - public static Error Insufficient_Gas; - - public static Error Insufficient_Supply; - - public static Error Insufficient_Energy; - - public static Error Insufficient_Tech; - - public static Error Insufficient_Ammo; - - public static Error Insufficient_Space; - - public static Error Invalid_Tile_Position; - - public static Error Unbuildable_Location; - - public static Error Unreachable_Location; - - public static Error Out_Of_Range; - - public static Error Unable_To_Hit; - - public static Error Access_Denied; - - public static Error File_Not_Found; - - public static Error Invalid_Parameter; - - public static Error None; - - public static Error Unknown; - - private static Map instances = new HashMap(); - - private Error(long pointer) { - this.pointer = pointer; - } - - private static Error get(long pointer) { - Error instance = instances.get(pointer); - if (instance == null) { - instance = new Error(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - public String c_str() { - return c_str_native(pointer); - } - - public String toString(){ - return c_str(); - } - - private native String c_str_native(long pointer); -} \ No newline at end of file diff --git a/bwapi/Event.java b/bwapi/Event.java deleted file mode 100644 index 87c511e..0000000 --- a/bwapi/Event.java +++ /dev/null @@ -1,64 +0,0 @@ -package bwapi; - -import bwapi.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Event { - - public Position getPosition() { - return getPosition_native(pointer); - } - - public String getText() { - return getText_native(pointer); - } - - public Unit getUnit() { - return getUnit_native(pointer); - } - - public Player getPlayer() { - return getPlayer_native(pointer); - } - - public boolean isWinner() { - return isWinner_native(pointer); - } - - - private static Map instances = new HashMap(); - - private Event(long pointer) { - this.pointer = pointer; - } - - private static Event get(long pointer) { - if (pointer == 0 ) { - return null; - } - Event instance = instances.get(pointer); - if (instance == null ) { - instance = new Event(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native Position getPosition_native(long pointer); - - private native String getText_native(long pointer); - - private native Unit getUnit_native(long pointer); - - private native Player getPlayer_native(long pointer); - - private native boolean isWinner_native(long pointer); - - -} diff --git a/bwapi/EventType/Enum.java b/bwapi/EventType/Enum.java deleted file mode 100644 index 9cc537a..0000000 --- a/bwapi/EventType/Enum.java +++ /dev/null @@ -1,42 +0,0 @@ -package bwapi.EventType; - -import bwapi.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public enum Enum { - - MatchStart(0), - MatchEnd(1), - MatchFrame(2), - MenuFrame(3), - SendText(4), - ReceiveText(5), - PlayerLeft(6), - NukeDetect(7), - UnitDiscover(8), - UnitEvade(9), - UnitShow(10), - UnitHide(11), - UnitCreate(12), - UnitDestroy(13), - UnitMorph(14), - UnitRenegade(15), - SaveGame(16), - UnitComplete(17), - PlayerDropped(18); - - private int value; - - public int getValue(){ - return value; - } - - Enum(int value){ - this.value = value; - } - -} diff --git a/bwapi/ExplosionType.java b/bwapi/ExplosionType.java deleted file mode 100644 index d46a275..0000000 --- a/bwapi/ExplosionType.java +++ /dev/null @@ -1,94 +0,0 @@ -package bwapi; - -import bwapi.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class ExplosionType { - - public String c_str() { - return c_str_native(pointer); - } - - public String toString(){ - return c_str(); - } - - public static ExplosionType None; - - public static ExplosionType Normal; - - public static ExplosionType Radial_Splash; - - public static ExplosionType Enemy_Splash; - - public static ExplosionType Lockdown; - - public static ExplosionType Nuclear_Missile; - - public static ExplosionType Parasite; - - public static ExplosionType Broodlings; - - public static ExplosionType EMP_Shockwave; - - public static ExplosionType Irradiate; - - public static ExplosionType Ensnare; - - public static ExplosionType Plague; - - public static ExplosionType Stasis_Field; - - public static ExplosionType Dark_Swarm; - - public static ExplosionType Consume; - - public static ExplosionType Yamato_Gun; - - public static ExplosionType Restoration; - - public static ExplosionType Disruption_Web; - - public static ExplosionType Corrosive_Acid; - - public static ExplosionType Mind_Control; - - public static ExplosionType Feedback; - - public static ExplosionType Optical_Flare; - - public static ExplosionType Maelstrom; - - public static ExplosionType Air_Splash; - - public static ExplosionType Unknown; - - - private static Map instances = new HashMap(); - - private ExplosionType(long pointer) { - this.pointer = pointer; - } - - private static ExplosionType get(long pointer) { - if (pointer == 0 ) { - return null; - } - ExplosionType instance = instances.get(pointer); - if (instance == null ) { - instance = new ExplosionType(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String c_str_native(long pointer); - - -} diff --git a/bwapi/Flag/Enum.java b/bwapi/Flag/Enum.java deleted file mode 100644 index 6180b0b..0000000 --- a/bwapi/Flag/Enum.java +++ /dev/null @@ -1,25 +0,0 @@ -package bwapi.Flag; - -import bwapi.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public enum Enum { - - CompleteMapInformation(0), - UserInput(1); - - private int value; - - public int getValue(){ - return value; - } - - Enum(int value){ - this.value = value; - } - -} diff --git a/bwapi/Force.java b/bwapi/Force.java deleted file mode 100644 index 4ed88f2..0000000 --- a/bwapi/Force.java +++ /dev/null @@ -1,52 +0,0 @@ -package bwapi; - -import bwapi.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Force { - - public int getID() { - return getID_native(pointer); - } - - public String getName() { - return getName_native(pointer); - } - - public List getPlayers() { - return getPlayers_native(pointer); - } - - - private static Map instances = new HashMap(); - - private Force(long pointer) { - this.pointer = pointer; - } - - private static Force get(long pointer) { - if (pointer == 0 ) { - return null; - } - Force instance = instances.get(pointer); - if (instance == null ) { - instance = new Force(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native int getID_native(long pointer); - - private native String getName_native(long pointer); - - private native List getPlayers_native(long pointer); - - -} diff --git a/bwapi/Game.java b/bwapi/Game.java deleted file mode 100644 index 24edd17..0000000 --- a/bwapi/Game.java +++ /dev/null @@ -1,1090 +0,0 @@ -package bwapi; - -import bwapi.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Game { - - public List getForces() { - return getForces_native(pointer); - } - - public List getPlayers() { - return getPlayers_native(pointer); - } - - public List getAllUnits() { - return getAllUnits_native(pointer); - } - - public List getMinerals() { - return getMinerals_native(pointer); - } - - public List getGeysers() { - return getGeysers_native(pointer); - } - - public List getNeutralUnits() { - return getNeutralUnits_native(pointer); - } - - public List getStaticMinerals() { - return getStaticMinerals_native(pointer); - } - - public List getStaticGeysers() { - return getStaticGeysers_native(pointer); - } - - public List getStaticNeutralUnits() { - return getStaticNeutralUnits_native(pointer); - } - - public List getBullets() { - return getBullets_native(pointer); - } - - public List getNukeDots() { - return getNukeDots_native(pointer); - } - - public Force getForce(int forceID) { - return getForce_native(pointer, forceID); - } - - public Player getPlayer(int playerID) { - return getPlayer_native(pointer, playerID); - } - - public Unit getUnit(int unitID) { - return getUnit_native(pointer, unitID); - } - - public Unit indexToUnit(int unitIndex) { - return indexToUnit_native(pointer, unitIndex); - } - - public Region getRegion(int regionID) { - return getRegion_native(pointer, regionID); - } - - public GameType getGameType() { - return getGameType_native(pointer); - } - - public int getLatency() { - return getLatency_native(pointer); - } - - public int getFrameCount() { - return getFrameCount_native(pointer); - } - - public int getFPS() { - return getFPS_native(pointer); - } - - public double getAverageFPS() { - return getAverageFPS_native(pointer); - } - - public Position getMousePosition() { - return getMousePosition_native(pointer); - } - - public boolean getMouseState(MouseButton button) { - return getMouseState_native(pointer, button); - } - - public boolean getMouseState(int button) { - return getMouseState_native(pointer, button); - } - - public boolean getKeyState(Key key) { - return getKeyState_native(pointer, key); - } - - public boolean getKeyState(int key) { - return getKeyState_native(pointer, key); - } - - public Position getScreenPosition() { - return getScreenPosition_native(pointer); - } - - public void setScreenPosition(int x, int y) { - setScreenPosition_native(pointer, x, y); - } - - public void setScreenPosition(Position p) { - setScreenPosition_native(pointer, p); - } - - public void pingMinimap(int x, int y) { - pingMinimap_native(pointer, x, y); - } - - public void pingMinimap(Position p) { - pingMinimap_native(pointer, p); - } - - public boolean isFlagEnabled(int flag) { - return isFlagEnabled_native(pointer, flag); - } - - public void enableFlag(int flag) { - enableFlag_native(pointer, flag); - } - - public List getUnitsOnTile(int tileX, int tileY) { - return getUnitsOnTile_native(pointer, tileX, tileY); - } - - public List getUnitsInRectangle(int left, int top, int right, int bottom) { - return getUnitsInRectangle_native(pointer, left, top, right, bottom); - } - - public List getUnitsInRectangle(Position topLeft, Position bottomRight) { - return getUnitsInRectangle_native(pointer, topLeft, bottomRight); - } - - public List getUnitsInRadius(Position center, int radius) { - return getUnitsInRadius_native(pointer, center, radius); - } - - public Error getLastError() { - return getLastError_native(pointer); - } - - public boolean setLastError(Error e) { - return setLastError_native(pointer, e); - } - - public int mapWidth() { - return mapWidth_native(pointer); - } - - public int mapHeight() { - return mapHeight_native(pointer); - } - - public String mapFileName() { - return mapFileName_native(pointer); - } - - public String mapPathName() { - return mapPathName_native(pointer); - } - - public String mapName() { - return mapName_native(pointer); - } - - public String mapHash() { - return mapHash_native(pointer); - } - - public boolean isWalkable(int walkX, int walkY) { - return isWalkable_native(pointer, walkX, walkY); - } - - public boolean isBuildable(int tileX, int tileY) { - return isBuildable_native(pointer, tileX, tileY); - } - - public boolean isBuildable(int tileX, int tileY, boolean includeBuildings) { - return isBuildable_native(pointer, tileX, tileY, includeBuildings); - } - - public boolean isBuildable(TilePosition position) { - return isBuildable_native(pointer, position); - } - - public boolean isBuildable(TilePosition position, boolean includeBuildings) { - return isBuildable_native(pointer, position, includeBuildings); - } - - public boolean isVisible(int tileX, int tileY) { - return isVisible_native(pointer, tileX, tileY); - } - - public boolean isVisible(TilePosition position) { - return isVisible_native(pointer, position); - } - - public boolean isExplored(int tileX, int tileY) { - return isExplored_native(pointer, tileX, tileY); - } - - public boolean isExplored(TilePosition position) { - return isExplored_native(pointer, position); - } - - public boolean hasCreep(int tileX, int tileY) { - return hasCreep_native(pointer, tileX, tileY); - } - - public boolean hasCreep(TilePosition position) { - return hasCreep_native(pointer, position); - } - - public boolean hasPower(int tileX, int tileY) { - return hasPower_native(pointer, tileX, tileY); - } - - public boolean hasPower(int tileX, int tileY, UnitType unitType) { - return hasPower_native(pointer, tileX, tileY, unitType); - } - - public boolean hasPower(TilePosition position) { - return hasPower_native(pointer, position); - } - - public boolean hasPower(TilePosition position, UnitType unitType) { - return hasPower_native(pointer, position, unitType); - } - - public boolean hasPower(int tileX, int tileY, int tileWidth, int tileHeight) { - return hasPower_native(pointer, tileX, tileY, tileWidth, tileHeight); - } - - public boolean hasPower(int tileX, int tileY, int tileWidth, int tileHeight, UnitType unitType) { - return hasPower_native(pointer, tileX, tileY, tileWidth, tileHeight, unitType); - } - - public boolean hasPower(TilePosition position, int tileWidth, int tileHeight) { - return hasPower_native(pointer, position, tileWidth, tileHeight); - } - - public boolean hasPower(TilePosition position, int tileWidth, int tileHeight, UnitType unitType) { - return hasPower_native(pointer, position, tileWidth, tileHeight, unitType); - } - - public boolean hasPowerPrecise(int x, int y) { - return hasPowerPrecise_native(pointer, x, y); - } - - public boolean hasPowerPrecise(int x, int y, UnitType unitType) { - return hasPowerPrecise_native(pointer, x, y, unitType); - } - - public boolean hasPowerPrecise(Position position) { - return hasPowerPrecise_native(pointer, position); - } - - public boolean hasPowerPrecise(Position position, UnitType unitType) { - return hasPowerPrecise_native(pointer, position, unitType); - } - - public boolean canBuildHere(Unit builder, TilePosition position, UnitType type) { - return canBuildHere_native(pointer, builder, position, type); - } - - public boolean canBuildHere(Unit builder, TilePosition position, UnitType type, boolean checkExplored) { - return canBuildHere_native(pointer, builder, position, type, checkExplored); - } - - public boolean canMake(Unit builder, UnitType type) { - return canMake_native(pointer, builder, type); - } - - public boolean canResearch(Unit unit, TechType type) { - return canResearch_native(pointer, unit, type); - } - - public boolean canUpgrade(Unit unit, UpgradeType type) { - return canUpgrade_native(pointer, unit, type); - } - - public List getStartLocations() { - return getStartLocations_native(pointer); - } - - public void printf(String cstr_format) { - printf_native(pointer, cstr_format); - } - - public void sendText(String cstr_format) { - sendText_native(pointer, cstr_format); - } - - public void sendTextEx(boolean toAllies, String cstr_format) { - sendTextEx_native(pointer, toAllies, cstr_format); - } - - public void changeRace(Race race) { - changeRace_native(pointer, race); - } - - public boolean isInGame() { - return isInGame_native(pointer); - } - - public boolean isMultiplayer() { - return isMultiplayer_native(pointer); - } - - public boolean isBattleNet() { - return isBattleNet_native(pointer); - } - - public boolean isPaused() { - return isPaused_native(pointer); - } - - public boolean isReplay() { - return isReplay_native(pointer); - } - - public void startGame() { - startGame_native(pointer); - } - - public void pauseGame() { - pauseGame_native(pointer); - } - - public void resumeGame() { - resumeGame_native(pointer); - } - - public void leaveGame() { - leaveGame_native(pointer); - } - - public void restartGame() { - restartGame_native(pointer); - } - - public void setLocalSpeed() { - setLocalSpeed_native(pointer); - } - - public void setLocalSpeed(int speed) { - setLocalSpeed_native(pointer, speed); - } - - public boolean issueCommand(List units, UnitCommand command) { - return issueCommand_native(pointer, units, command); - } - - public List getSelectedUnits() { - return getSelectedUnits_native(pointer); - } - - public Player self() { - return self_native(pointer); - } - - public Player enemy() { - return enemy_native(pointer); - } - - public Player neutral() { - return neutral_native(pointer); - } - - public List allies() { - return allies_native(pointer); - } - - public List enemies() { - return enemies_native(pointer); - } - - public List observers() { - return observers_native(pointer); - } - - public void setTextSize() { - setTextSize_native(pointer); - } - - public void setTextSize(int size) { - setTextSize_native(pointer, size); - } - - public void drawText(int ctype, int x, int y, String cstr_format) { - drawText_native(pointer, ctype, x, y, cstr_format); - } - - public void drawTextMap(int x, int y, String cstr_format) { - drawTextMap_native(pointer, x, y, cstr_format); - } - - public void drawTextMouse(int x, int y, String cstr_format) { - drawTextMouse_native(pointer, x, y, cstr_format); - } - - public void drawTextScreen(int x, int y, String cstr_format) { - drawTextScreen_native(pointer, x, y, cstr_format); - } - - public void drawBox(int ctype, int left, int top, int right, int bottom, Color color) { - drawBox_native(pointer, ctype, left, top, right, bottom, color); - } - - public void drawBox(int ctype, int left, int top, int right, int bottom, Color color, boolean isSolid) { - drawBox_native(pointer, ctype, left, top, right, bottom, color, isSolid); - } - - public void drawBoxMap(int left, int top, int right, int bottom, Color color) { - drawBoxMap_native(pointer, left, top, right, bottom, color); - } - - public void drawBoxMap(int left, int top, int right, int bottom, Color color, boolean isSolid) { - drawBoxMap_native(pointer, left, top, right, bottom, color, isSolid); - } - - public void drawBoxMouse(int left, int top, int right, int bottom, Color color) { - drawBoxMouse_native(pointer, left, top, right, bottom, color); - } - - public void drawBoxMouse(int left, int top, int right, int bottom, Color color, boolean isSolid) { - drawBoxMouse_native(pointer, left, top, right, bottom, color, isSolid); - } - - public void drawBoxScreen(int left, int top, int right, int bottom, Color color) { - drawBoxScreen_native(pointer, left, top, right, bottom, color); - } - - public void drawBoxScreen(int left, int top, int right, int bottom, Color color, boolean isSolid) { - drawBoxScreen_native(pointer, left, top, right, bottom, color, isSolid); - } - - public void drawTriangle(int ctype, int ax, int ay, int bx, int by, int cx, int cy, Color color) { - drawTriangle_native(pointer, ctype, ax, ay, bx, by, cx, cy, color); - } - - public void drawTriangle(int ctype, int ax, int ay, int bx, int by, int cx, int cy, Color color, boolean isSolid) { - drawTriangle_native(pointer, ctype, ax, ay, bx, by, cx, cy, color, isSolid); - } - - public void drawTriangleMap(int ax, int ay, int bx, int by, int cx, int cy, Color color) { - drawTriangleMap_native(pointer, ax, ay, bx, by, cx, cy, color); - } - - public void drawTriangleMap(int ax, int ay, int bx, int by, int cx, int cy, Color color, boolean isSolid) { - drawTriangleMap_native(pointer, ax, ay, bx, by, cx, cy, color, isSolid); - } - - public void drawTriangleMouse(int ax, int ay, int bx, int by, int cx, int cy, Color color) { - drawTriangleMouse_native(pointer, ax, ay, bx, by, cx, cy, color); - } - - public void drawTriangleMouse(int ax, int ay, int bx, int by, int cx, int cy, Color color, boolean isSolid) { - drawTriangleMouse_native(pointer, ax, ay, bx, by, cx, cy, color, isSolid); - } - - public void drawTriangleScreen(int ax, int ay, int bx, int by, int cx, int cy, Color color) { - drawTriangleScreen_native(pointer, ax, ay, bx, by, cx, cy, color); - } - - public void drawTriangleScreen(int ax, int ay, int bx, int by, int cx, int cy, Color color, boolean isSolid) { - drawTriangleScreen_native(pointer, ax, ay, bx, by, cx, cy, color, isSolid); - } - - public void drawCircle(int ctype, int x, int y, int radius, Color color) { - drawCircle_native(pointer, ctype, x, y, radius, color); - } - - public void drawCircle(int ctype, int x, int y, int radius, Color color, boolean isSolid) { - drawCircle_native(pointer, ctype, x, y, radius, color, isSolid); - } - - public void drawCircleMap(int x, int y, int radius, Color color) { - drawCircleMap_native(pointer, x, y, radius, color); - } - - public void drawCircleMap(int x, int y, int radius, Color color, boolean isSolid) { - drawCircleMap_native(pointer, x, y, radius, color, isSolid); - } - - public void drawCircleMouse(int x, int y, int radius, Color color) { - drawCircleMouse_native(pointer, x, y, radius, color); - } - - public void drawCircleMouse(int x, int y, int radius, Color color, boolean isSolid) { - drawCircleMouse_native(pointer, x, y, radius, color, isSolid); - } - - public void drawCircleScreen(int x, int y, int radius, Color color) { - drawCircleScreen_native(pointer, x, y, radius, color); - } - - public void drawCircleScreen(int x, int y, int radius, Color color, boolean isSolid) { - drawCircleScreen_native(pointer, x, y, radius, color, isSolid); - } - - public void drawEllipse(int ctype, int x, int y, int xrad, int yrad, Color color) { - drawEllipse_native(pointer, ctype, x, y, xrad, yrad, color); - } - - public void drawEllipse(int ctype, int x, int y, int xrad, int yrad, Color color, boolean isSolid) { - drawEllipse_native(pointer, ctype, x, y, xrad, yrad, color, isSolid); - } - - public void drawEllipseMap(int x, int y, int xrad, int yrad, Color color) { - drawEllipseMap_native(pointer, x, y, xrad, yrad, color); - } - - public void drawEllipseMap(int x, int y, int xrad, int yrad, Color color, boolean isSolid) { - drawEllipseMap_native(pointer, x, y, xrad, yrad, color, isSolid); - } - - public void drawEllipseMouse(int x, int y, int xrad, int yrad, Color color) { - drawEllipseMouse_native(pointer, x, y, xrad, yrad, color); - } - - public void drawEllipseMouse(int x, int y, int xrad, int yrad, Color color, boolean isSolid) { - drawEllipseMouse_native(pointer, x, y, xrad, yrad, color, isSolid); - } - - public void drawEllipseScreen(int x, int y, int xrad, int yrad, Color color) { - drawEllipseScreen_native(pointer, x, y, xrad, yrad, color); - } - - public void drawEllipseScreen(int x, int y, int xrad, int yrad, Color color, boolean isSolid) { - drawEllipseScreen_native(pointer, x, y, xrad, yrad, color, isSolid); - } - - public void drawDot(int ctype, int x, int y, Color color) { - drawDot_native(pointer, ctype, x, y, color); - } - - public void drawDotMap(int x, int y, Color color) { - drawDotMap_native(pointer, x, y, color); - } - - public void drawDotMouse(int x, int y, Color color) { - drawDotMouse_native(pointer, x, y, color); - } - - public void drawDotScreen(int x, int y, Color color) { - drawDotScreen_native(pointer, x, y, color); - } - - public void drawLine(int ctype, int x1, int y1, int x2, int y2, Color color) { - drawLine_native(pointer, ctype, x1, y1, x2, y2, color); - } - - public void drawLineMap(int x1, int y1, int x2, int y2, Color color) { - drawLineMap_native(pointer, x1, y1, x2, y2, color); - } - - public void drawLineMouse(int x1, int y1, int x2, int y2, Color color) { - drawLineMouse_native(pointer, x1, y1, x2, y2, color); - } - - public void drawLineScreen(int x1, int y1, int x2, int y2, Color color) { - drawLineScreen_native(pointer, x1, y1, x2, y2, color); - } - - public void getScreenBuffer() { - getScreenBuffer_native(pointer); - } - - public int getLatencyFrames() { - return getLatencyFrames_native(pointer); - } - - public int getLatencyTime() { - return getLatencyTime_native(pointer); - } - - public int getRemainingLatencyFrames() { - return getRemainingLatencyFrames_native(pointer); - } - - public int getRemainingLatencyTime() { - return getRemainingLatencyTime_native(pointer); - } - - public int getRevision() { - return getRevision_native(pointer); - } - - public boolean isDebug() { - return isDebug_native(pointer); - } - - public boolean isLatComEnabled() { - return isLatComEnabled_native(pointer); - } - - public void setLatCom(boolean isEnabled) { - setLatCom_native(pointer, isEnabled); - } - - public int getReplayFrameCount() { - return getReplayFrameCount_native(pointer); - } - - public void setGUI() { - setGUI_native(pointer); - } - - public void setGUI(boolean enabled) { - setGUI_native(pointer, enabled); - } - - public int getAPM() { - return getAPM_native(pointer); - } - - public int getAPM(boolean includeSelects) { - return getAPM_native(pointer, includeSelects); - } - - public boolean setMap(String cstr_mapFileName) { - return setMap_native(pointer, cstr_mapFileName); - } - - public void setFrameSkip() { - setFrameSkip_native(pointer); - } - - public void setFrameSkip(int frameSkip) { - setFrameSkip_native(pointer, frameSkip); - } - - public boolean hasPath(Position source, Position destination) { - return hasPath_native(pointer, source, destination); - } - - public boolean setAlliance(Player player, boolean allied) { - return setAlliance_native(pointer, player, allied); - } - - public boolean setAlliance(Player player) { - return setAlliance_native(pointer, player); - } - - public boolean setAlliance(Player player, boolean allied, boolean alliedVictory) { - return setAlliance_native(pointer, player, allied, alliedVictory); - } - - public boolean setVision(Player player) { - return setVision_native(pointer, player); - } - - public boolean setVision(Player player, boolean enabled) { - return setVision_native(pointer, player, enabled); - } - - public void setCommandOptimizationLevel() { - setCommandOptimizationLevel_native(pointer); - } - - public void setCommandOptimizationLevel(int level) { - setCommandOptimizationLevel_native(pointer, level); - } - - public Region getRegionAt(int x, int y) { - return getRegionAt_native(pointer, x, y); - } - - public Region getRegionAt(Position position) { - return getRegionAt_native(pointer, position); - } - - public int getLastEventTime() { - return getLastEventTime_native(pointer); - } - - public boolean setReplayVision(Player player) { - return setReplayVision_native(pointer, player); - } - - public boolean setReplayVision(Player player, boolean enabled) { - return setReplayVision_native(pointer, player, enabled); - } - - public boolean setRevealAll() { - return setRevealAll_native(pointer); - } - - public boolean setRevealAll(boolean reveal) { - return setRevealAll_native(pointer, reveal); - } - - - private static Map instances = new HashMap(); - - private Game(long pointer) { - this.pointer = pointer; - } - - private static Game get(long pointer) { - if (pointer == 0 ) { - return null; - } - Game instance = instances.get(pointer); - if (instance == null ) { - instance = new Game(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native List getForces_native(long pointer); - - private native List getPlayers_native(long pointer); - - private native List getAllUnits_native(long pointer); - - private native List getMinerals_native(long pointer); - - private native List getGeysers_native(long pointer); - - private native List getNeutralUnits_native(long pointer); - - private native List getStaticMinerals_native(long pointer); - - private native List getStaticGeysers_native(long pointer); - - private native List getStaticNeutralUnits_native(long pointer); - - private native List getBullets_native(long pointer); - - private native List getNukeDots_native(long pointer); - - private native Force getForce_native(long pointer, int forceID); - - private native Player getPlayer_native(long pointer, int playerID); - - private native Unit getUnit_native(long pointer, int unitID); - - private native Unit indexToUnit_native(long pointer, int unitIndex); - - private native Region getRegion_native(long pointer, int regionID); - - private native GameType getGameType_native(long pointer); - - private native int getLatency_native(long pointer); - - private native int getFrameCount_native(long pointer); - - private native int getFPS_native(long pointer); - - private native double getAverageFPS_native(long pointer); - - private native Position getMousePosition_native(long pointer); - - private native boolean getMouseState_native(long pointer, MouseButton button); - - private native boolean getMouseState_native(long pointer, int button); - - private native boolean getKeyState_native(long pointer, Key key); - - private native boolean getKeyState_native(long pointer, int key); - - private native Position getScreenPosition_native(long pointer); - - private native void setScreenPosition_native(long pointer, int x, int y); - - private native void setScreenPosition_native(long pointer, Position p); - - private native void pingMinimap_native(long pointer, int x, int y); - - private native void pingMinimap_native(long pointer, Position p); - - private native boolean isFlagEnabled_native(long pointer, int flag); - - private native void enableFlag_native(long pointer, int flag); - - private native List getUnitsOnTile_native(long pointer, int tileX, int tileY); - - private native List getUnitsInRectangle_native(long pointer, int left, int top, int right, int bottom); - - private native List getUnitsInRectangle_native(long pointer, Position topLeft, Position bottomRight); - - private native List getUnitsInRadius_native(long pointer, Position center, int radius); - - private native Error getLastError_native(long pointer); - - private native boolean setLastError_native(long pointer, Error e); - - private native int mapWidth_native(long pointer); - - private native int mapHeight_native(long pointer); - - private native String mapFileName_native(long pointer); - - private native String mapPathName_native(long pointer); - - private native String mapName_native(long pointer); - - private native String mapHash_native(long pointer); - - private native boolean isWalkable_native(long pointer, int walkX, int walkY); - - private native boolean isBuildable_native(long pointer, int tileX, int tileY); - - private native boolean isBuildable_native(long pointer, int tileX, int tileY, boolean includeBuildings); - - private native boolean isBuildable_native(long pointer, TilePosition position); - - private native boolean isBuildable_native(long pointer, TilePosition position, boolean includeBuildings); - - private native boolean isVisible_native(long pointer, int tileX, int tileY); - - private native boolean isVisible_native(long pointer, TilePosition position); - - private native boolean isExplored_native(long pointer, int tileX, int tileY); - - private native boolean isExplored_native(long pointer, TilePosition position); - - private native boolean hasCreep_native(long pointer, int tileX, int tileY); - - private native boolean hasCreep_native(long pointer, TilePosition position); - - private native boolean hasPower_native(long pointer, int tileX, int tileY); - - private native boolean hasPower_native(long pointer, int tileX, int tileY, UnitType unitType); - - private native boolean hasPower_native(long pointer, TilePosition position); - - private native boolean hasPower_native(long pointer, TilePosition position, UnitType unitType); - - private native boolean hasPower_native(long pointer, int tileX, int tileY, int tileWidth, int tileHeight); - - private native boolean hasPower_native(long pointer, int tileX, int tileY, int tileWidth, int tileHeight, UnitType unitType); - - private native boolean hasPower_native(long pointer, TilePosition position, int tileWidth, int tileHeight); - - private native boolean hasPower_native(long pointer, TilePosition position, int tileWidth, int tileHeight, UnitType unitType); - - private native boolean hasPowerPrecise_native(long pointer, int x, int y); - - private native boolean hasPowerPrecise_native(long pointer, int x, int y, UnitType unitType); - - private native boolean hasPowerPrecise_native(long pointer, Position position); - - private native boolean hasPowerPrecise_native(long pointer, Position position, UnitType unitType); - - private native boolean canBuildHere_native(long pointer, Unit builder, TilePosition position, UnitType type); - - private native boolean canBuildHere_native(long pointer, Unit builder, TilePosition position, UnitType type, boolean checkExplored); - - private native boolean canMake_native(long pointer, Unit builder, UnitType type); - - private native boolean canResearch_native(long pointer, Unit unit, TechType type); - - private native boolean canUpgrade_native(long pointer, Unit unit, UpgradeType type); - - private native List getStartLocations_native(long pointer); - - private native void printf_native(long pointer, String cstr_format); - - private native void sendText_native(long pointer, String cstr_format); - - private native void sendTextEx_native(long pointer, boolean toAllies, String cstr_format); - - private native void changeRace_native(long pointer, Race race); - - private native boolean isInGame_native(long pointer); - - private native boolean isMultiplayer_native(long pointer); - - private native boolean isBattleNet_native(long pointer); - - private native boolean isPaused_native(long pointer); - - private native boolean isReplay_native(long pointer); - - private native void startGame_native(long pointer); - - private native void pauseGame_native(long pointer); - - private native void resumeGame_native(long pointer); - - private native void leaveGame_native(long pointer); - - private native void restartGame_native(long pointer); - - private native void setLocalSpeed_native(long pointer); - - private native void setLocalSpeed_native(long pointer, int speed); - - private native boolean issueCommand_native(long pointer, List units, UnitCommand command); - - private native List getSelectedUnits_native(long pointer); - - private native Player self_native(long pointer); - - private native Player enemy_native(long pointer); - - private native Player neutral_native(long pointer); - - private native List allies_native(long pointer); - - private native List enemies_native(long pointer); - - private native List observers_native(long pointer); - - private native void setTextSize_native(long pointer); - - private native void setTextSize_native(long pointer, int size); - - private native void drawText_native(long pointer, int ctype, int x, int y, String cstr_format); - - private native void drawTextMap_native(long pointer, int x, int y, String cstr_format); - - private native void drawTextMouse_native(long pointer, int x, int y, String cstr_format); - - private native void drawTextScreen_native(long pointer, int x, int y, String cstr_format); - - private native void drawBox_native(long pointer, int ctype, int left, int top, int right, int bottom, Color color); - - private native void drawBox_native(long pointer, int ctype, int left, int top, int right, int bottom, Color color, boolean isSolid); - - private native void drawBoxMap_native(long pointer, int left, int top, int right, int bottom, Color color); - - private native void drawBoxMap_native(long pointer, int left, int top, int right, int bottom, Color color, boolean isSolid); - - private native void drawBoxMouse_native(long pointer, int left, int top, int right, int bottom, Color color); - - private native void drawBoxMouse_native(long pointer, int left, int top, int right, int bottom, Color color, boolean isSolid); - - private native void drawBoxScreen_native(long pointer, int left, int top, int right, int bottom, Color color); - - private native void drawBoxScreen_native(long pointer, int left, int top, int right, int bottom, Color color, boolean isSolid); - - private native void drawTriangle_native(long pointer, int ctype, int ax, int ay, int bx, int by, int cx, int cy, Color color); - - private native void drawTriangle_native(long pointer, int ctype, int ax, int ay, int bx, int by, int cx, int cy, Color color, boolean isSolid); - - private native void drawTriangleMap_native(long pointer, int ax, int ay, int bx, int by, int cx, int cy, Color color); - - private native void drawTriangleMap_native(long pointer, int ax, int ay, int bx, int by, int cx, int cy, Color color, boolean isSolid); - - private native void drawTriangleMouse_native(long pointer, int ax, int ay, int bx, int by, int cx, int cy, Color color); - - private native void drawTriangleMouse_native(long pointer, int ax, int ay, int bx, int by, int cx, int cy, Color color, boolean isSolid); - - private native void drawTriangleScreen_native(long pointer, int ax, int ay, int bx, int by, int cx, int cy, Color color); - - private native void drawTriangleScreen_native(long pointer, int ax, int ay, int bx, int by, int cx, int cy, Color color, boolean isSolid); - - private native void drawCircle_native(long pointer, int ctype, int x, int y, int radius, Color color); - - private native void drawCircle_native(long pointer, int ctype, int x, int y, int radius, Color color, boolean isSolid); - - private native void drawCircleMap_native(long pointer, int x, int y, int radius, Color color); - - private native void drawCircleMap_native(long pointer, int x, int y, int radius, Color color, boolean isSolid); - - private native void drawCircleMouse_native(long pointer, int x, int y, int radius, Color color); - - private native void drawCircleMouse_native(long pointer, int x, int y, int radius, Color color, boolean isSolid); - - private native void drawCircleScreen_native(long pointer, int x, int y, int radius, Color color); - - private native void drawCircleScreen_native(long pointer, int x, int y, int radius, Color color, boolean isSolid); - - private native void drawEllipse_native(long pointer, int ctype, int x, int y, int xrad, int yrad, Color color); - - private native void drawEllipse_native(long pointer, int ctype, int x, int y, int xrad, int yrad, Color color, boolean isSolid); - - private native void drawEllipseMap_native(long pointer, int x, int y, int xrad, int yrad, Color color); - - private native void drawEllipseMap_native(long pointer, int x, int y, int xrad, int yrad, Color color, boolean isSolid); - - private native void drawEllipseMouse_native(long pointer, int x, int y, int xrad, int yrad, Color color); - - private native void drawEllipseMouse_native(long pointer, int x, int y, int xrad, int yrad, Color color, boolean isSolid); - - private native void drawEllipseScreen_native(long pointer, int x, int y, int xrad, int yrad, Color color); - - private native void drawEllipseScreen_native(long pointer, int x, int y, int xrad, int yrad, Color color, boolean isSolid); - - private native void drawDot_native(long pointer, int ctype, int x, int y, Color color); - - private native void drawDotMap_native(long pointer, int x, int y, Color color); - - private native void drawDotMouse_native(long pointer, int x, int y, Color color); - - private native void drawDotScreen_native(long pointer, int x, int y, Color color); - - private native void drawLine_native(long pointer, int ctype, int x1, int y1, int x2, int y2, Color color); - - private native void drawLineMap_native(long pointer, int x1, int y1, int x2, int y2, Color color); - - private native void drawLineMouse_native(long pointer, int x1, int y1, int x2, int y2, Color color); - - private native void drawLineScreen_native(long pointer, int x1, int y1, int x2, int y2, Color color); - - private native void getScreenBuffer_native(long pointer); - - private native int getLatencyFrames_native(long pointer); - - private native int getLatencyTime_native(long pointer); - - private native int getRemainingLatencyFrames_native(long pointer); - - private native int getRemainingLatencyTime_native(long pointer); - - private native int getRevision_native(long pointer); - - private native boolean isDebug_native(long pointer); - - private native boolean isLatComEnabled_native(long pointer); - - private native void setLatCom_native(long pointer, boolean isEnabled); - - private native int getReplayFrameCount_native(long pointer); - - private native void setGUI_native(long pointer); - - private native void setGUI_native(long pointer, boolean enabled); - - private native int getAPM_native(long pointer); - - private native int getAPM_native(long pointer, boolean includeSelects); - - private native boolean setMap_native(long pointer, String cstr_mapFileName); - - private native void setFrameSkip_native(long pointer); - - private native void setFrameSkip_native(long pointer, int frameSkip); - - private native boolean hasPath_native(long pointer, Position source, Position destination); - - private native boolean setAlliance_native(long pointer, Player player, boolean allied); - - private native boolean setAlliance_native(long pointer, Player player); - - private native boolean setAlliance_native(long pointer, Player player, boolean allied, boolean alliedVictory); - - private native boolean setVision_native(long pointer, Player player); - - private native boolean setVision_native(long pointer, Player player, boolean enabled); - - private native void setCommandOptimizationLevel_native(long pointer); - - private native void setCommandOptimizationLevel_native(long pointer, int level); - - private native Region getRegionAt_native(long pointer, int x, int y); - - private native Region getRegionAt_native(long pointer, Position position); - - private native int getLastEventTime_native(long pointer); - - private native boolean setReplayVision_native(long pointer, Player player); - - private native boolean setReplayVision_native(long pointer, Player player, boolean enabled); - - private native boolean setRevealAll_native(long pointer); - - private native boolean setRevealAll_native(long pointer, boolean reveal); - - -} diff --git a/bwapi/GameType.java b/bwapi/GameType.java deleted file mode 100644 index 8d74436..0000000 --- a/bwapi/GameType.java +++ /dev/null @@ -1,76 +0,0 @@ -package bwapi; - -import bwapi.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class GameType { - - public String c_str() { - return c_str_native(pointer); - } - - public String toString(){ - return c_str(); - } - - public static GameType Melee; - - public static GameType Free_For_All; - - public static GameType One_on_One; - - public static GameType Capture_The_Flag; - - public static GameType Greed; - - public static GameType Slaughter; - - public static GameType Sudden_Death; - - public static GameType Ladder; - - public static GameType Use_Map_Settings; - - public static GameType Team_Melee; - - public static GameType Team_Free_For_All; - - public static GameType Team_Capture_The_Flag; - - public static GameType Top_vs_Bottom; - - public static GameType Pro_Gamer_League; - - public static GameType None; - - public static GameType Unknown; - - - private static Map instances = new HashMap(); - - private GameType(long pointer) { - this.pointer = pointer; - } - - private static GameType get(long pointer) { - if (pointer == 0 ) { - return null; - } - GameType instance = instances.get(pointer); - if (instance == null ) { - instance = new GameType(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String c_str_native(long pointer); - - -} diff --git a/bwapi/Key.java b/bwapi/Key.java deleted file mode 100644 index e46474f..0000000 --- a/bwapi/Key.java +++ /dev/null @@ -1,219 +0,0 @@ -package bwapi; - -import bwapi.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public enum Key { - - K_LBUTTON(1), - K_RBUTTON(2), - K_CANCEL(3), - K_MBUTTON(4), - K_XBUTTON1(5), - K_XBUTTON2(6), - K_BACK(8), - K_TAB(9), - K_CLEAR(12), - K_RETURN(13), - K_SHIFT(16), - K_CONTROL(17), - K_MENU(18), - K_PAUSE(19), - K_CAPITAL(20), - K_KANA(21), - K_HANGEUL(21), - K_HANGUL(21), - K_JUNJA(23), - K_FINAL(24), - K_HANJA(25), - K_KANJI(25), - K_ESCAPE(27), - K_CONVERT(28), - K_NONCONVERT(29), - K_ACCEPT(30), - K_MODECHANGE(31), - K_SPACE(32), - K_PRIOR(33), - K_NEXT(34), - K_END(35), - K_HOME(36), - K_LEFT(37), - K_UP(38), - K_RIGHT(39), - K_DOWN(40), - K_SELECT(41), - K_PRINT(42), - K_EXECUTE(43), - K_SNAPSHOT(44), - K_INSERT(45), - K_DELETE(46), - K_HELP(47), - K_0(48), - K_1(49), - K_2(50), - K_3(51), - K_4(52), - K_5(53), - K_6(54), - K_7(55), - K_8(56), - K_9(57), - K_A(65), - K_B(66), - K_C(67), - K_D(68), - K_E(69), - K_F(70), - K_G(71), - K_H(72), - K_I(73), - K_J(74), - K_K(75), - K_L(76), - K_M(77), - K_N(78), - K_O(79), - K_P(80), - K_Q(81), - K_R(82), - K_S(83), - K_T(84), - K_U(85), - K_V(86), - K_W(87), - K_X(88), - K_Y(89), - K_Z(90), - K_LWIN(91), - K_RWIN(92), - K_APPS(93), - K_SLEEP(95), - K_NUMPAD0(96), - K_NUMPAD1(97), - K_NUMPAD2(98), - K_NUMPAD3(99), - K_NUMPAD4(100), - K_NUMPAD5(101), - K_NUMPAD6(102), - K_NUMPAD7(103), - K_NUMPAD8(104), - K_NUMPAD9(105), - K_MULTIPLY(106), - K_ADD(107), - K_SEPARATOR(108), - K_SUBTRACT(109), - K_DECIMAL(110), - K_DIVIDE(111), - K_F1(112), - K_F2(113), - K_F3(114), - K_F4(115), - K_F5(116), - K_F6(117), - K_F7(118), - K_F8(119), - K_F9(120), - K_F10(121), - K_F11(122), - K_F12(123), - K_F13(124), - K_F14(125), - K_F15(126), - K_F16(127), - K_F17(128), - K_F18(129), - K_F19(130), - K_F20(131), - K_F21(132), - K_F22(133), - K_F23(134), - K_F24(135), - K_NUMLOCK(144), - K_SCROLL(145), - K_OEM_NEC_EQUAL(146), - K_OEM_FJ_JISHO(146), - K_OEM_FJ_MASSHOU(147), - K_OEM_FJ_TOUROKU(148), - K_OEM_FJ_LOYA(149), - K_OEM_FJ_ROYA(150), - K_LSHIFT(160), - K_RSHIFT(161), - K_LCONTROL(162), - K_RCONTROL(163), - K_LMENU(164), - K_RMENU(165), - K_BROWSER_BACK(166), - K_BROWSER_FORWARD(167), - K_BROWSER_REFRESH(168), - K_BROWSER_STOP(169), - K_BROWSER_SEARCH(170), - K_BROWSER_FAVORITES(171), - K_BROWSER_HOME(172), - K_VOLUME_MUTE(173), - K_VOLUME_DOWN(174), - K_VOLUME_UP(175), - K_MEDIA_NEXT_TRACK(176), - K_MEDIA_PREV_TRACK(177), - K_MEDIA_STOP(178), - K_MEDIA_PLAY_PAUSE(179), - K_LAUNCH_MAIL(180), - K_LAUNCH_MEDIA_SELECT(181), - K_LAUNCH_APP1(182), - K_LAUNCH_APP2(183), - K_OEM_1(186), - K_OEM_PLUS(187), - K_OEM_COMMA(188), - K_OEM_MINUS(189), - K_OEM_PERIOD(190), - K_OEM_2(191), - K_OEM_3(192), - K_OEM_4(219), - K_OEM_5(220), - K_OEM_6(221), - K_OEM_7(222), - K_OEM_8(223), - K_OEM_AX(225), - K_OEM_102(226), - K_ICO_HELP(227), - K_ICO_00(228), - K_PROCESSKEY(229), - K_ICO_CLEAR(230), - K_PACKET(231), - K_OEM_RESET(233), - K_OEM_JUMP(234), - K_OEM_PA1(235), - K_OEM_PA2(236), - K_OEM_PA3(237), - K_OEM_WSCTRL(238), - K_OEM_CUSEL(239), - K_OEM_ATTN(240), - K_OEM_FINISH(241), - K_OEM_COPY(242), - K_OEM_AUTO(243), - K_OEM_ENLW(244), - K_OEM_BACKTAB(245), - K_ATTN(246), - K_CRSEL(247), - K_EXSEL(248), - K_EREOF(249), - K_PLAY(250), - K_ZOOM(251), - K_NONAME(252), - K_PA1(253), - K_OEM_CLEAR(254); - - private int value; - - public int getValue(){ - return value; - } - - Key(int value){ - this.value = value; - } - -} diff --git a/bwapi/Latency/Enum.java b/bwapi/Latency/Enum.java deleted file mode 100644 index e7fe434..0000000 --- a/bwapi/Latency/Enum.java +++ /dev/null @@ -1,29 +0,0 @@ -package bwapi.Latency; - -import bwapi.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public enum Enum { - - SinglePlayer(2), - LanLow(5), - LanMedium(7), - LanHigh(9), - BattlenetLow(14), - BattlenetMedium(19); - - private int value; - - public int getValue(){ - return value; - } - - Enum(int value){ - this.value = value; - } - -} diff --git a/bwapi/Mirror.java b/bwapi/Mirror.java deleted file mode 100644 index 6f0e31f..0000000 --- a/bwapi/Mirror.java +++ /dev/null @@ -1,262 +0,0 @@ -package bwapi; - -import bwapi.AIModule; -import bwapi.BWEventListener; - -import java.io.*; -import java.io.File; -import java.lang.Exception; -import java.lang.UnsupportedOperationException; -import java.util.*; -import java.util.zip.*; - -/** - *

The API entry point. Standard use case:

- *
    - *
  • Create a Mirror object and use {@link #getModule()} and then set an {@link bwapi.AIModule}'s {@link bwapi.BWEventListener}
    - *
  • Call {@link #startGame()} to init the API and connect to Broodwar, then launch Broodwar from ChaosLauncher.
  • - *
  • In you {@link bwapi.BWEventListener#onStart()} method, receive the Game object by calling {@link #getGame()}
  • - *
- *
- * Example - *
- *     {@code
- *
- *     mirror.getModule().setEventListener(new DefaultBWListener()
- *     {
- *            public void onStart() {
- *                game = mirror.getGame();
- *                self = game.self();
- *                //initialization
- *                ....
- *            }
- *
- *           public void onUpdate() {
- *               for (Unit myUnit : self.getUnits()) {
- *                   //give orders to unit
- *                   ...
- *                }
- *           }
- *        });
- *     }
- *     mirror.startGame();
- * 
- - *

Note: The Game object is initialized during the {@link #startGame()} as well as other BWMirror API's constants. - * Do not use any API releated methods/fields prior to {@link #startGame()}.

- - */ -public class Mirror { - - private Game game; - - private AIModule module = new AIModule(); - - private FrameCallback frameCallback; - - private static final boolean EXTRACT_JAR = true; - - private static final String VERSION = "1_2"; - - static { - String arch = System.getProperty("os.arch"); - String dllNames[] = {"bwapi_bridge" + VERSION, "gmp-vc90-mt", "mpfr-vc90-mt"}; - if(!arch.equals("x86")){ - throw new UnsupportedOperationException("BWMirror API supports only x86 architecture."); - } - try { - if (EXTRACT_JAR) { - System.setProperty("java.library.path", "."); - java.lang.reflect.Field fieldSysPath = ClassLoader.class.getDeclaredField("sys_paths"); - fieldSysPath.setAccessible(true); - fieldSysPath.set(null, null); - - String path = Mirror.class.getProtectionDomain().getCodeSource().getLocation().getPath(); - String decodedPath = java.net.URLDecoder.decode(path, "UTF-8"); - - for (String dllName : dllNames) { - String dllNameExt = dllName + ".dll"; - if (!new File(dllNameExt).exists()) { - JarResources jar = new JarResources(path); - byte[] correctDllData = jar.getResource(dllNameExt); - FileOutputStream funnyStream = new FileOutputStream(dllNameExt); - funnyStream.write(correctDllData); - funnyStream.close(); - } - } - } - } catch (Exception e) { - System.err.println("Failed to extract native libraries.\n" + e); - } - - System.loadLibrary(dllNames[0]); - - File dataDir = new File("bwapi-data/BWTA"); - if(!dataDir.exists()){ - try { - dataDir.mkdirs(); - } catch (Exception e) { - System.err.println("Unable to create /bwapi-data/BWTA folder, BWTA analysis will not be saved."); - } - } - } - - public Game getGame() { - return game; - } - - public AIModule getModule() { - return module; - } - - /** - * Starts the API, initializes all constants ( {@link bwapi.UnitType}, {@link bwapi.WeaponType} ) and the {@link bwapi.Game} object. - * This method blocks until the end of game. - */ - public native void startGame(); - - private void update() { - if (frameCallback != null) { - frameCallback.update(); - } - } - - /*public void setFrameCallback(bwapi.Mirror.FrameCallback frameCallback) { - this.frameCallback = frameCallback; - } */ - - /** - * The simplest interface to receive update event from Broodwar. The {@link #update()} method is called once each frame. - * For a simple bot and implementation of this interface is enough, to receive all in game events, implement {@link bwapi.BWEventListener}. - */ - /*public*/ private interface FrameCallback { - public void update(); - } - - @SuppressWarnings({"unchecked"}) - private static class JarResources { - - // external debug flag - public boolean debugOn = false; - - // jar resource mapping tables - private Hashtable htSizes = new Hashtable(); - private Hashtable htJarContents = new Hashtable(); - - // a jar file - private String jarFileName; - - /** - * creates a javabot.JarResources. It extracts all resources from a Jar - * into an internal hashtable, keyed by resource names. - * - * @param jarFileName a jar or zip file - */ - public JarResources(String jarFileName) { - this.jarFileName = jarFileName; - init(); - } - - /** - * Extracts a jar resource as a blob. - * - * @param name a resource name. - */ - public byte[] getResource(String name) { - return (byte[]) htJarContents.get(name); - } - - /** - * initializes internal hash tables with Jar file resources. - */ - private void init() { - try { - // extracts just sizes only. - ZipFile zf = new ZipFile(jarFileName); - Enumeration e = zf.entries(); - while (e.hasMoreElements()) { - ZipEntry ze = (ZipEntry) e.nextElement(); - if (debugOn) { - System.out.println(dumpZipEntry(ze)); - } - htSizes.put(ze.getName(), new Integer((int) ze.getSize())); - } - zf.close(); - - // extract resources and put them into the hashtable. - FileInputStream fis = new FileInputStream(jarFileName); - BufferedInputStream bis = new BufferedInputStream(fis); - ZipInputStream zis = new ZipInputStream(bis); - ZipEntry ze = null; - while ((ze = zis.getNextEntry()) != null) { - if (ze.isDirectory()) { - continue; - } - if (debugOn) { - System.out.println( - "ze.getName()=" + ze.getName() + "," + "getSize()=" + ze.getSize() - ); - } - int size = (int) ze.getSize(); - // -1 means unknown size. - if (size == -1) { - size = ((Integer) htSizes.get(ze.getName())).intValue(); - } - byte[] b = new byte[(int) size]; - int rb = 0; - int chunk = 0; - while (((int) size - rb) > 0) { - chunk = zis.read(b, rb, (int) size - rb); - if (chunk == -1) { - break; - } - rb += chunk; - } - // add to internal resource hashtable - htJarContents.put(ze.getName(), b); - if (debugOn) { - System.out.println( - ze.getName() + " rb=" + rb + - ",size=" + size + - ",csize=" + ze.getCompressedSize() - ); - } - } - } catch (NullPointerException e) { - System.out.println("done."); - } catch (FileNotFoundException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } - } - - /** - * Dumps a zip entry into a string. - * - * @param ze a ZipEntry - */ - private String dumpZipEntry(ZipEntry ze) { - StringBuffer sb = new StringBuffer(); - if (ze.isDirectory()) { - sb.append("d "); - } else { - sb.append("f "); - } - if (ze.getMethod() == ZipEntry.STORED) { - sb.append("stored "); - } else { - sb.append("defalted "); - } - sb.append(ze.getName()); - sb.append("\t"); - sb.append("" + ze.getSize()); - if (ze.getMethod() == ZipEntry.DEFLATED) { - sb.append("/" + ze.getCompressedSize()); - } - return (sb.toString()); - } - - - } -} \ No newline at end of file diff --git a/bwapi/MouseButton.java b/bwapi/MouseButton.java deleted file mode 100644 index 8aa52e7..0000000 --- a/bwapi/MouseButton.java +++ /dev/null @@ -1,26 +0,0 @@ -package bwapi; - -import bwapi.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public enum MouseButton { - - M_LEFT(0), - M_RIGHT(1), - M_MIDDLE(2); - - private int value; - - public int getValue(){ - return value; - } - - MouseButton(int value){ - this.value = value; - } - -} diff --git a/bwapi/Order.java b/bwapi/Order.java deleted file mode 100644 index 04902a4..0000000 --- a/bwapi/Order.java +++ /dev/null @@ -1,358 +0,0 @@ -package bwapi; - -import bwapi.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Order { - - public String c_str() { - return c_str_native(pointer); - } - - public String toString(){ - return c_str(); - } - - public static Order Die; - - public static Order Stop; - - public static Order Guard; - - public static Order PlayerGuard; - - public static Order TurretGuard; - - public static Order BunkerGuard; - - public static Order Move; - - public static Order AttackUnit; - - public static Order AttackTile; - - public static Order Hover; - - public static Order AttackMove; - - public static Order InfestedCommandCenter; - - public static Order UnusedNothing; - - public static Order UnusedPowerup; - - public static Order TowerGuard; - - public static Order VultureMine; - - public static Order Nothing; - - public static Order Nothing3; - - public static Order CastInfestation; - - public static Order InfestingCommandCenter; - - public static Order PlaceBuilding; - - public static Order BuildProtoss2; - - public static Order ConstructingBuilding; - - public static Order Repair; - - public static Order PlaceAddon; - - public static Order BuildAddon; - - public static Order Train; - - public static Order RallyPointUnit; - - public static Order RallyPointTile; - - public static Order ZergBirth; - - public static Order ZergUnitMorph; - - public static Order ZergBuildingMorph; - - public static Order IncompleteBuilding; - - public static Order BuildNydusExit; - - public static Order EnterNydusCanal; - - public static Order Follow; - - public static Order Carrier; - - public static Order ReaverCarrierMove; - - public static Order CarrierIgnore2; - - public static Order Reaver; - - public static Order TrainFighter; - - public static Order InterceptorAttack; - - public static Order ScarabAttack; - - public static Order RechargeShieldsUnit; - - public static Order RechargeShieldsBattery; - - public static Order ShieldBattery; - - public static Order InterceptorReturn; - - public static Order BuildingLand; - - public static Order BuildingLiftOff; - - public static Order DroneLiftOff; - - public static Order LiftingOff; - - public static Order ResearchTech; - - public static Order Upgrade; - - public static Order Larva; - - public static Order SpawningLarva; - - public static Order Harvest1; - - public static Order Harvest2; - - public static Order MoveToGas; - - public static Order WaitForGas; - - public static Order HarvestGas; - - public static Order ReturnGas; - - public static Order MoveToMinerals; - - public static Order WaitForMinerals; - - public static Order MiningMinerals; - - public static Order Harvest3; - - public static Order Harvest4; - - public static Order ReturnMinerals; - - public static Order Interrupted; - - public static Order EnterTransport; - - public static Order PickupIdle; - - public static Order PickupTransport; - - public static Order PickupBunker; - - public static Order Pickup4; - - public static Order PowerupIdle; - - public static Order Sieging; - - public static Order Unsieging; - - public static Order InitCreepGrowth; - - public static Order SpreadCreep; - - public static Order StoppingCreepGrowth; - - public static Order GuardianAspect; - - public static Order ArchonWarp; - - public static Order CompletingArchonsummon; - - public static Order HoldPosition; - - public static Order Cloak; - - public static Order Decloak; - - public static Order Unload; - - public static Order MoveUnload; - - public static Order FireYamatoGun; - - public static Order CastLockdown; - - public static Order Burrowing; - - public static Order Burrowed; - - public static Order Unburrowing; - - public static Order CastDarkSwarm; - - public static Order CastParasite; - - public static Order CastSpawnBroodlings; - - public static Order CastEMPShockwave; - - public static Order NukeWait; - - public static Order NukeTrain; - - public static Order NukeLaunch; - - public static Order NukePaint; - - public static Order NukeUnit; - - public static Order CastNuclearStrike; - - public static Order NukeTrack; - - public static Order CloakNearbyUnits; - - public static Order PlaceMine; - - public static Order RightClickAction; - - public static Order CastRecall; - - public static Order TeleporttoLocation; - - public static Order CastScannerSweep; - - public static Order Scanner; - - public static Order CastDefensiveMatrix; - - public static Order CastPsionicStorm; - - public static Order CastIrradiate; - - public static Order CastPlague; - - public static Order CastConsume; - - public static Order CastEnsnare; - - public static Order CastStasisField; - - public static Order CastHallucination; - - public static Order Hallucination2; - - public static Order ResetCollision; - - public static Order Patrol; - - public static Order CTFCOPInit; - - public static Order CTFCOPStarted; - - public static Order CTFCOP2; - - public static Order ComputerAI; - - public static Order AtkMoveEP; - - public static Order HarassMove; - - public static Order AIPatrol; - - public static Order GuardPost; - - public static Order RescuePassive; - - public static Order Neutral; - - public static Order ComputerReturn; - - public static Order SelfDestrucing; - - public static Order Critter; - - public static Order HiddenGun; - - public static Order OpenDoor; - - public static Order CloseDoor; - - public static Order HideTrap; - - public static Order RevealTrap; - - public static Order Enabledoodad; - - public static Order Disabledoodad; - - public static Order Warpin; - - public static Order Medic; - - public static Order MedicHeal1; - - public static Order HealMove; - - public static Order MedicHeal2; - - public static Order CastRestoration; - - public static Order CastDisruptionWeb; - - public static Order CastMindControl; - - public static Order DarkArchonMeld; - - public static Order CastFeedback; - - public static Order CastOpticalFlare; - - public static Order CastMaelstrom; - - public static Order JunkYardDog; - - public static Order Fatal; - - public static Order None; - - public static Order Unknown; - - - private static Map instances = new HashMap(); - - private Order(long pointer) { - this.pointer = pointer; - } - - private static Order get(long pointer) { - if (pointer == 0 ) { - return null; - } - Order instance = instances.get(pointer); - if (instance == null ) { - instance = new Order(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String c_str_native(long pointer); - - -} diff --git a/bwapi/Player.java b/bwapi/Player.java deleted file mode 100644 index 8a12401..0000000 --- a/bwapi/Player.java +++ /dev/null @@ -1,358 +0,0 @@ -package bwapi; - -import bwapi.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Player { - - public int getID() { - return getID_native(pointer); - } - - public String getName() { - return getName_native(pointer); - } - - public List getUnits() { - return getUnits_native(pointer); - } - - public Race getRace() { - return getRace_native(pointer); - } - - public PlayerType getType() { - return getType_native(pointer); - } - - public Force getForce() { - return getForce_native(pointer); - } - - public boolean isAlly(Player player) { - return isAlly_native(pointer, player); - } - - public boolean isEnemy(Player player) { - return isEnemy_native(pointer, player); - } - - public boolean isNeutral() { - return isNeutral_native(pointer); - } - - public TilePosition getStartLocation() { - return getStartLocation_native(pointer); - } - - public boolean isVictorious() { - return isVictorious_native(pointer); - } - - public boolean isDefeated() { - return isDefeated_native(pointer); - } - - public boolean leftGame() { - return leftGame_native(pointer); - } - - public int minerals() { - return minerals_native(pointer); - } - - public int gas() { - return gas_native(pointer); - } - - public int gatheredMinerals() { - return gatheredMinerals_native(pointer); - } - - public int gatheredGas() { - return gatheredGas_native(pointer); - } - - public int repairedMinerals() { - return repairedMinerals_native(pointer); - } - - public int repairedGas() { - return repairedGas_native(pointer); - } - - public int refundedMinerals() { - return refundedMinerals_native(pointer); - } - - public int refundedGas() { - return refundedGas_native(pointer); - } - - public int spentMinerals() { - return spentMinerals_native(pointer); - } - - public int spentGas() { - return spentGas_native(pointer); - } - - public int supplyTotal() { - return supplyTotal_native(pointer); - } - - public int supplyTotal(Race race) { - return supplyTotal_native(pointer, race); - } - - public int supplyUsed() { - return supplyUsed_native(pointer); - } - - public int supplyUsed(Race race) { - return supplyUsed_native(pointer, race); - } - - public int allUnitCount(UnitType unit) { - return allUnitCount_native(pointer, unit); - } - - public int visibleUnitCount(UnitType unit) { - return visibleUnitCount_native(pointer, unit); - } - - public int completedUnitCount(UnitType unit) { - return completedUnitCount_native(pointer, unit); - } - - public int incompleteUnitCount(UnitType unit) { - return incompleteUnitCount_native(pointer, unit); - } - - public int deadUnitCount(UnitType unit) { - return deadUnitCount_native(pointer, unit); - } - - public int killedUnitCount(UnitType unit) { - return killedUnitCount_native(pointer, unit); - } - - public boolean hasResearched(TechType tech) { - return hasResearched_native(pointer, tech); - } - - public boolean isResearching(TechType tech) { - return isResearching_native(pointer, tech); - } - - public boolean isUpgrading(UpgradeType upgrade) { - return isUpgrading_native(pointer, upgrade); - } - - public Color getColor() { - return getColor_native(pointer); - } - - public int getTextColor() { - return getTextColor_native(pointer); - } - - public int maxEnergy(UnitType unit) { - return maxEnergy_native(pointer, unit); - } - - public double topSpeed(UnitType unit) { - return topSpeed_native(pointer, unit); - } - - public int groundWeaponMaxRange(UnitType unit) { - return groundWeaponMaxRange_native(pointer, unit); - } - - public int airWeaponMaxRange(UnitType unit) { - return airWeaponMaxRange_native(pointer, unit); - } - - public int weaponMaxRange(WeaponType weapon) { - return weaponMaxRange_native(pointer, weapon); - } - - public int sightRange(UnitType unit) { - return sightRange_native(pointer, unit); - } - - public int groundWeaponDamageCooldown(UnitType unit) { - return groundWeaponDamageCooldown_native(pointer, unit); - } - - public int armor(UnitType unit) { - return armor_native(pointer, unit); - } - - public int getUnitScore() { - return getUnitScore_native(pointer); - } - - public int getKillScore() { - return getKillScore_native(pointer); - } - - public int getBuildingScore() { - return getBuildingScore_native(pointer); - } - - public int getRazingScore() { - return getRazingScore_native(pointer); - } - - public int getCustomScore() { - return getCustomScore_native(pointer); - } - - public boolean isObserver() { - return isObserver_native(pointer); - } - - public boolean isResearchAvailable(TechType tech) { - return isResearchAvailable_native(pointer, tech); - } - - public boolean isUnitAvailable(UnitType unit) { - return isUnitAvailable_native(pointer, unit); - } - - - private static Map instances = new HashMap(); - - private Player(long pointer) { - this.pointer = pointer; - } - - private static Player get(long pointer) { - if (pointer == 0 ) { - return null; - } - Player instance = instances.get(pointer); - if (instance == null ) { - instance = new Player(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native int getID_native(long pointer); - - private native String getName_native(long pointer); - - private native List getUnits_native(long pointer); - - private native Race getRace_native(long pointer); - - private native PlayerType getType_native(long pointer); - - private native Force getForce_native(long pointer); - - private native boolean isAlly_native(long pointer, Player player); - - private native boolean isEnemy_native(long pointer, Player player); - - private native boolean isNeutral_native(long pointer); - - private native TilePosition getStartLocation_native(long pointer); - - private native boolean isVictorious_native(long pointer); - - private native boolean isDefeated_native(long pointer); - - private native boolean leftGame_native(long pointer); - - private native int minerals_native(long pointer); - - private native int gas_native(long pointer); - - private native int gatheredMinerals_native(long pointer); - - private native int gatheredGas_native(long pointer); - - private native int repairedMinerals_native(long pointer); - - private native int repairedGas_native(long pointer); - - private native int refundedMinerals_native(long pointer); - - private native int refundedGas_native(long pointer); - - private native int spentMinerals_native(long pointer); - - private native int spentGas_native(long pointer); - - private native int supplyTotal_native(long pointer); - - private native int supplyTotal_native(long pointer, Race race); - - private native int supplyUsed_native(long pointer); - - private native int supplyUsed_native(long pointer, Race race); - - private native int allUnitCount_native(long pointer, UnitType unit); - - private native int visibleUnitCount_native(long pointer, UnitType unit); - - private native int completedUnitCount_native(long pointer, UnitType unit); - - private native int incompleteUnitCount_native(long pointer, UnitType unit); - - private native int deadUnitCount_native(long pointer, UnitType unit); - - private native int killedUnitCount_native(long pointer, UnitType unit); - - private native boolean hasResearched_native(long pointer, TechType tech); - - private native boolean isResearching_native(long pointer, TechType tech); - - private native boolean isUpgrading_native(long pointer, UpgradeType upgrade); - - private native Color getColor_native(long pointer); - - private native int getTextColor_native(long pointer); - - private native int maxEnergy_native(long pointer, UnitType unit); - - private native double topSpeed_native(long pointer, UnitType unit); - - private native int groundWeaponMaxRange_native(long pointer, UnitType unit); - - private native int airWeaponMaxRange_native(long pointer, UnitType unit); - - private native int weaponMaxRange_native(long pointer, WeaponType weapon); - - private native int sightRange_native(long pointer, UnitType unit); - - private native int groundWeaponDamageCooldown_native(long pointer, UnitType unit); - - private native int armor_native(long pointer, UnitType unit); - - private native int getUnitScore_native(long pointer); - - private native int getKillScore_native(long pointer); - - private native int getBuildingScore_native(long pointer); - - private native int getRazingScore_native(long pointer); - - private native int getCustomScore_native(long pointer); - - private native boolean isObserver_native(long pointer); - - private native boolean isResearchAvailable_native(long pointer, TechType tech); - - private native boolean isUnitAvailable_native(long pointer, UnitType unit); - - -} diff --git a/bwapi/PlayerType.java b/bwapi/PlayerType.java deleted file mode 100644 index 3821569..0000000 --- a/bwapi/PlayerType.java +++ /dev/null @@ -1,66 +0,0 @@ -package bwapi; - -import bwapi.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class PlayerType { - - public String c_str() { - return c_str_native(pointer); - } - - public String toString(){ - return c_str(); - } - - public static PlayerType None; - - public static PlayerType Computer; - - public static PlayerType Player; - - public static PlayerType RescuePassive; - - public static PlayerType EitherPreferComputer; - - public static PlayerType EitherPreferHuman; - - public static PlayerType Neutral; - - public static PlayerType Closed; - - public static PlayerType PlayerLeft; - - public static PlayerType ComputerLeft; - - public static PlayerType Unknown; - - - private static Map instances = new HashMap(); - - private PlayerType(long pointer) { - this.pointer = pointer; - } - - private static PlayerType get(long pointer) { - if (pointer == 0 ) { - return null; - } - PlayerType instance = instances.get(pointer); - if (instance == null ) { - instance = new PlayerType(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String c_str_native(long pointer); - - -} diff --git a/bwapi/Position.java b/bwapi/Position.java deleted file mode 100644 index c321b6a..0000000 --- a/bwapi/Position.java +++ /dev/null @@ -1,90 +0,0 @@ -package bwapi; - -import java.lang.Override; -import java.util.HashMap; -import java.util.Map; - -/** - * Positions are measured in pixels and are the highest resolution. - */ -public class Position extends AbstractPoint{ - - private int x, y; - - public Position(int x, int y) { - this.x = x; - this.y = y; - } - - public String toString() { - return "[" + x + ", " + y + "]"; - } - - public native boolean isValid(); - - public native Position makeValid(); - - public native double getDistance(Position position); - - public native int getApproxDistance(Position position); - - public native double getLength(); - - public native boolean hasPath(Position position); - - public int getX() { - return x; - } - - public int getY() { - return y; - } - - public static Position Invalid; - - public static Position None; - - public static Position Unknown; - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof Position)) return false; - - Position position = (Position) o; - - if (x != position.x) return false; - if (y != position.y) return false; - - return true; - } - - @Override - public int hashCode() { - int result = x; - result = 31 * result + y; - return result; - } - - - private static Map instances = new HashMap(); - - private Position(long pointer) { - this.pointer = pointer; - } - - private static Position get(long pointer) { - Position instance = instances.get(pointer); - if (instance == null) { - instance = new Position(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - public Position getPoint(){ - return this; - } -} \ No newline at end of file diff --git a/bwapi/PositionedObject.java b/bwapi/PositionedObject.java deleted file mode 100644 index 4d40575..0000000 --- a/bwapi/PositionedObject.java +++ /dev/null @@ -1,15 +0,0 @@ -package bwapi; - -import bwapi.Position; - -/** - * Interrmediate class used to translate getPoint() calls to getPosition() calls. - */ -public abstract class PositionedObject extends AbstractPoint { - - public Position getPoint(){ - return getPosition(); - } - - public abstract Position getPosition(); -} \ No newline at end of file diff --git a/bwapi/Race.java b/bwapi/Race.java deleted file mode 100644 index 8dab711..0000000 --- a/bwapi/Race.java +++ /dev/null @@ -1,88 +0,0 @@ -package bwapi; - -import bwapi.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Race { - - public String c_str() { - return c_str_native(pointer); - } - - public String toString(){ - return c_str(); - } - - public UnitType getWorker() { - return getWorker_native(pointer); - } - - public UnitType getCenter() { - return getCenter_native(pointer); - } - - public UnitType getRefinery() { - return getRefinery_native(pointer); - } - - public UnitType getTransport() { - return getTransport_native(pointer); - } - - public UnitType getSupplyProvider() { - return getSupplyProvider_native(pointer); - } - - public static Race Zerg; - - public static Race Terran; - - public static Race Protoss; - - public static Race Random; - - public static Race Other; - - public static Race None; - - public static Race Unknown; - - - private static Map instances = new HashMap(); - - private Race(long pointer) { - this.pointer = pointer; - } - - private static Race get(long pointer) { - if (pointer == 0 ) { - return null; - } - Race instance = instances.get(pointer); - if (instance == null ) { - instance = new Race(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String c_str_native(long pointer); - - private native UnitType getWorker_native(long pointer); - - private native UnitType getCenter_native(long pointer); - - private native UnitType getRefinery_native(long pointer); - - private native UnitType getTransport_native(long pointer); - - private native UnitType getSupplyProvider_native(long pointer); - - -} diff --git a/bwapi/Region.java b/bwapi/Region.java deleted file mode 100644 index 9da8e35..0000000 --- a/bwapi/Region.java +++ /dev/null @@ -1,114 +0,0 @@ -package bwapi; - -import bwapi.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; -import bwapi.CenteredObject; - -public class Region extends CenteredObject -{ - - public int getID() { - return getID_native(pointer); - } - - public int getRegionGroupID() { - return getRegionGroupID_native(pointer); - } - - public Position getCenter() { - return getCenter_native(pointer); - } - - public boolean isHigherGround() { - return isHigherGround_native(pointer); - } - - public int getDefensePriority() { - return getDefensePriority_native(pointer); - } - - public boolean isWalkable() { - return isWalkable_native(pointer); - } - - public int getBoundsLeft() { - return getBoundsLeft_native(pointer); - } - - public int getBoundsTop() { - return getBoundsTop_native(pointer); - } - - public int getBoundsRight() { - return getBoundsRight_native(pointer); - } - - public int getBoundsBottom() { - return getBoundsBottom_native(pointer); - } - - public Region getClosestAccessibleRegion() { - return getClosestAccessibleRegion_native(pointer); - } - - public Region getClosestInaccessibleRegion() { - return getClosestInaccessibleRegion_native(pointer); - } - - public int getDistance(Region other) { - return getDistance_native(pointer, other); - } - - - private static Map instances = new HashMap(); - - private Region(long pointer) { - this.pointer = pointer; - } - - private static Region get(long pointer) { - if (pointer == 0 ) { - return null; - } - Region instance = instances.get(pointer); - if (instance == null ) { - instance = new Region(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native int getID_native(long pointer); - - private native int getRegionGroupID_native(long pointer); - - private native Position getCenter_native(long pointer); - - private native boolean isHigherGround_native(long pointer); - - private native int getDefensePriority_native(long pointer); - - private native boolean isWalkable_native(long pointer); - - private native int getBoundsLeft_native(long pointer); - - private native int getBoundsTop_native(long pointer); - - private native int getBoundsRight_native(long pointer); - - private native int getBoundsBottom_native(long pointer); - - private native Region getClosestAccessibleRegion_native(long pointer); - - private native Region getClosestInaccessibleRegion_native(long pointer); - - private native int getDistance_native(long pointer, Region other); - - -} diff --git a/bwapi/ShapeType/Enum.java b/bwapi/ShapeType/Enum.java deleted file mode 100644 index 92b4abb..0000000 --- a/bwapi/ShapeType/Enum.java +++ /dev/null @@ -1,30 +0,0 @@ -package bwapi.ShapeType; - -import bwapi.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public enum Enum { - - None(0), - Text(1), - Box(2), - Triangle(3), - Circle(4), - Ellipse(5), - Dot(6); - - private int value; - - public int getValue(){ - return value; - } - - Enum(int value){ - this.value = value; - } - -} diff --git a/bwapi/TechType.java b/bwapi/TechType.java deleted file mode 100644 index 43ada59..0000000 --- a/bwapi/TechType.java +++ /dev/null @@ -1,182 +0,0 @@ -package bwapi; - -import bwapi.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class TechType { - - public String c_str() { - return c_str_native(pointer); - } - - public String toString(){ - return c_str(); - } - - public Race getRace() { - return getRace_native(pointer); - } - - public int mineralPrice() { - return mineralPrice_native(pointer); - } - - public int gasPrice() { - return gasPrice_native(pointer); - } - - public int researchTime() { - return researchTime_native(pointer); - } - - public int energyUsed() { - return energyUsed_native(pointer); - } - - public UnitType whatResearches() { - return whatResearches_native(pointer); - } - - public WeaponType getWeapon() { - return getWeapon_native(pointer); - } - - public boolean targetsUnit() { - return targetsUnit_native(pointer); - } - - public boolean targetsPosition() { - return targetsPosition_native(pointer); - } - - public List whatUses() { - return whatUses_native(pointer); - } - - public Order getOrder() { - return getOrder_native(pointer); - } - - public static TechType Stim_Packs; - - public static TechType Lockdown; - - public static TechType EMP_Shockwave; - - public static TechType Spider_Mines; - - public static TechType Scanner_Sweep; - - public static TechType Tank_Siege_Mode; - - public static TechType Defensive_Matrix; - - public static TechType Irradiate; - - public static TechType Yamato_Gun; - - public static TechType Cloaking_Field; - - public static TechType Personnel_Cloaking; - - public static TechType Burrowing; - - public static TechType Infestation; - - public static TechType Spawn_Broodlings; - - public static TechType Dark_Swarm; - - public static TechType Plague; - - public static TechType Consume; - - public static TechType Ensnare; - - public static TechType Parasite; - - public static TechType Psionic_Storm; - - public static TechType Hallucination; - - public static TechType Recall; - - public static TechType Stasis_Field; - - public static TechType Archon_Warp; - - public static TechType Restoration; - - public static TechType Disruption_Web; - - public static TechType Mind_Control; - - public static TechType Dark_Archon_Meld; - - public static TechType Feedback; - - public static TechType Optical_Flare; - - public static TechType Maelstrom; - - public static TechType Lurker_Aspect; - - public static TechType Healing; - - public static TechType None; - - public static TechType Unknown; - - public static TechType Nuclear_Strike; - - - private static Map instances = new HashMap(); - - private TechType(long pointer) { - this.pointer = pointer; - } - - private static TechType get(long pointer) { - if (pointer == 0 ) { - return null; - } - TechType instance = instances.get(pointer); - if (instance == null ) { - instance = new TechType(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String c_str_native(long pointer); - - private native Race getRace_native(long pointer); - - private native int mineralPrice_native(long pointer); - - private native int gasPrice_native(long pointer); - - private native int researchTime_native(long pointer); - - private native int energyUsed_native(long pointer); - - private native UnitType whatResearches_native(long pointer); - - private native WeaponType getWeapon_native(long pointer); - - private native boolean targetsUnit_native(long pointer); - - private native boolean targetsPosition_native(long pointer); - - private native List whatUses_native(long pointer); - - private native Order getOrder_native(long pointer); - - -} diff --git a/bwapi/TilePosition.java b/bwapi/TilePosition.java deleted file mode 100644 index 9244647..0000000 --- a/bwapi/TilePosition.java +++ /dev/null @@ -1,89 +0,0 @@ -package bwapi; - -import java.lang.Override; -import java.util.HashMap; -import java.util.Map; - -/** - * Build Tiles - each build tile is a 4x4 square of walk tiles, or a 32x32 square of pixels. - * These are called build tiles because buildability data is available at this resolution, and correspond to the tiles seen in game. - * For example, a Command Center occupies an area of 4x3 build tiles. - */ -public class TilePosition extends AbstractPoint{ - private int x, y; - - public TilePosition(int x, int y) { - this.x = x; - this.y = y; - } - - public String toString() { - return "[" + x + ", " + y + "]"; - } - - public native boolean hasPath(TilePosition position); - - public native boolean isValid(); - - public native TilePosition makeValid(); - - public native double getDistance(TilePosition position); - - public native double getLength(); - - public int getX() { - return x; - } - - public int getY() { - return y; - } - - public static TilePosition Invalid; - - public static TilePosition None; - - public static TilePosition Unknown; - - private static Map instances = new HashMap(); - - private TilePosition(long pointer) { - this.pointer = pointer; - } - - private static TilePosition get(long pointer) { - TilePosition instance = instances.get(pointer); - if (instance == null) { - instance = new TilePosition(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof TilePosition)) return false; - - TilePosition that = (TilePosition) o; - - if (x != that.x) return false; - if (y != that.y) return false; - - return true; - } - - @Override - public int hashCode() { - int result = x; - result = 31 * result + y; - return result; - } - - public TilePosition getPoint(){ - return this; - } -} \ No newline at end of file diff --git a/bwapi/Tournament/ActionID.java b/bwapi/Tournament/ActionID.java deleted file mode 100644 index 87ec4ca..0000000 --- a/bwapi/Tournament/ActionID.java +++ /dev/null @@ -1,38 +0,0 @@ -package bwapi.Tournament; - -import bwapi.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public enum ActionID { - - EnableFlag(0), - ChangeRace(1), - StartGame(2), - PauseGame(3), - ResumeGame(4), - LeaveGame(5), - RestartGame(6), - SetLocalSpeed(7), - SetTextSize(8), - SetLatCom(9), - SetGUI(10), - SetMap(11), - SetFrameSkip(12), - Printf(13), - SendText(14); - - private int value; - - public int getValue(){ - return value; - } - - ActionID(int value){ - this.value = value; - } - -} diff --git a/bwapi/Unit.java b/bwapi/Unit.java deleted file mode 100644 index fd25119..0000000 --- a/bwapi/Unit.java +++ /dev/null @@ -1,1194 +0,0 @@ -package bwapi; - -import bwapi.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; -import bwapi.PositionedObject; - -public class Unit extends PositionedObject -{ - - public int getID() { - return getID_native(pointer); - } - - public int getReplayID() { - return getReplayID_native(pointer); - } - - public Player getPlayer() { - return getPlayer_native(pointer); - } - - public UnitType getType() { - return getType_native(pointer); - } - - public Position getPosition() { - return getPosition_native(pointer); - } - - public TilePosition getTilePosition() { - return getTilePosition_native(pointer); - } - - public double getAngle() { - return getAngle_native(pointer); - } - - public double getVelocityX() { - return getVelocityX_native(pointer); - } - - public double getVelocityY() { - return getVelocityY_native(pointer); - } - - public Region getRegion() { - return getRegion_native(pointer); - } - - public int getLeft() { - return getLeft_native(pointer); - } - - public int getTop() { - return getTop_native(pointer); - } - - public int getRight() { - return getRight_native(pointer); - } - - public int getBottom() { - return getBottom_native(pointer); - } - - public int getHitPoints() { - return getHitPoints_native(pointer); - } - - public int getShields() { - return getShields_native(pointer); - } - - public int getEnergy() { - return getEnergy_native(pointer); - } - - public int getResources() { - return getResources_native(pointer); - } - - public int getResourceGroup() { - return getResourceGroup_native(pointer); - } - - public int getDistance(Unit target) { - return getDistance_native(pointer, target); - } - - public int getDistance(Position target) { - return getDistance_native(pointer, target); - } - - public boolean hasPath(Unit target) { - return hasPath_native(pointer, target); - } - - public boolean hasPath(Position target) { - return hasPath_native(pointer, target); - } - - public int getLastCommandFrame() { - return getLastCommandFrame_native(pointer); - } - - public Player getLastAttackingPlayer() { - return getLastAttackingPlayer_native(pointer); - } - - public int getUpgradeLevel(UpgradeType upgrade) { - return getUpgradeLevel_native(pointer, upgrade); - } - - public UnitType getInitialType() { - return getInitialType_native(pointer); - } - - public Position getInitialPosition() { - return getInitialPosition_native(pointer); - } - - public TilePosition getInitialTilePosition() { - return getInitialTilePosition_native(pointer); - } - - public int getInitialHitPoints() { - return getInitialHitPoints_native(pointer); - } - - public int getInitialResources() { - return getInitialResources_native(pointer); - } - - public int getKillCount() { - return getKillCount_native(pointer); - } - - public int getAcidSporeCount() { - return getAcidSporeCount_native(pointer); - } - - public int getInterceptorCount() { - return getInterceptorCount_native(pointer); - } - - public int getScarabCount() { - return getScarabCount_native(pointer); - } - - public int getSpiderMineCount() { - return getSpiderMineCount_native(pointer); - } - - public int getGroundWeaponCooldown() { - return getGroundWeaponCooldown_native(pointer); - } - - public int getAirWeaponCooldown() { - return getAirWeaponCooldown_native(pointer); - } - - public int getSpellCooldown() { - return getSpellCooldown_native(pointer); - } - - public int getDefenseMatrixPoints() { - return getDefenseMatrixPoints_native(pointer); - } - - public int getDefenseMatrixTimer() { - return getDefenseMatrixTimer_native(pointer); - } - - public int getEnsnareTimer() { - return getEnsnareTimer_native(pointer); - } - - public int getIrradiateTimer() { - return getIrradiateTimer_native(pointer); - } - - public int getLockdownTimer() { - return getLockdownTimer_native(pointer); - } - - public int getMaelstromTimer() { - return getMaelstromTimer_native(pointer); - } - - public int getOrderTimer() { - return getOrderTimer_native(pointer); - } - - public int getPlagueTimer() { - return getPlagueTimer_native(pointer); - } - - public int getRemoveTimer() { - return getRemoveTimer_native(pointer); - } - - public int getStasisTimer() { - return getStasisTimer_native(pointer); - } - - public int getStimTimer() { - return getStimTimer_native(pointer); - } - - public UnitType getBuildType() { - return getBuildType_native(pointer); - } - - public TechType getTech() { - return getTech_native(pointer); - } - - public UpgradeType getUpgrade() { - return getUpgrade_native(pointer); - } - - public int getRemainingBuildTime() { - return getRemainingBuildTime_native(pointer); - } - - public int getRemainingTrainTime() { - return getRemainingTrainTime_native(pointer); - } - - public int getRemainingResearchTime() { - return getRemainingResearchTime_native(pointer); - } - - public int getRemainingUpgradeTime() { - return getRemainingUpgradeTime_native(pointer); - } - - public Unit getBuildUnit() { - return getBuildUnit_native(pointer); - } - - public Unit getTarget() { - return getTarget_native(pointer); - } - - public Position getTargetPosition() { - return getTargetPosition_native(pointer); - } - - public Order getOrder() { - return getOrder_native(pointer); - } - - public Order getSecondaryOrder() { - return getSecondaryOrder_native(pointer); - } - - public Unit getOrderTarget() { - return getOrderTarget_native(pointer); - } - - public Position getOrderTargetPosition() { - return getOrderTargetPosition_native(pointer); - } - - public Position getRallyPosition() { - return getRallyPosition_native(pointer); - } - - public Unit getRallyUnit() { - return getRallyUnit_native(pointer); - } - - public Unit getAddon() { - return getAddon_native(pointer); - } - - public Unit getNydusExit() { - return getNydusExit_native(pointer); - } - - public Unit getPowerUp() { - return getPowerUp_native(pointer); - } - - public Unit getTransport() { - return getTransport_native(pointer); - } - - public List getLoadedUnits() { - return getLoadedUnits_native(pointer); - } - - public Unit getCarrier() { - return getCarrier_native(pointer); - } - - public List getInterceptors() { - return getInterceptors_native(pointer); - } - - public Unit getHatchery() { - return getHatchery_native(pointer); - } - - public List getLarva() { - return getLarva_native(pointer); - } - - public List getUnitsInRadius(int radius) { - return getUnitsInRadius_native(pointer, radius); - } - - public List getUnitsInWeaponRange(WeaponType weapon) { - return getUnitsInWeaponRange_native(pointer, weapon); - } - - public boolean exists() { - return exists_native(pointer); - } - - public boolean hasNuke() { - return hasNuke_native(pointer); - } - - public boolean isAccelerating() { - return isAccelerating_native(pointer); - } - - public boolean isAttacking() { - return isAttacking_native(pointer); - } - - public boolean isAttackFrame() { - return isAttackFrame_native(pointer); - } - - public boolean isBeingConstructed() { - return isBeingConstructed_native(pointer); - } - - public boolean isBeingGathered() { - return isBeingGathered_native(pointer); - } - - public boolean isBeingHealed() { - return isBeingHealed_native(pointer); - } - - public boolean isBlind() { - return isBlind_native(pointer); - } - - public boolean isBraking() { - return isBraking_native(pointer); - } - - public boolean isBurrowed() { - return isBurrowed_native(pointer); - } - - public boolean isCarryingGas() { - return isCarryingGas_native(pointer); - } - - public boolean isCarryingMinerals() { - return isCarryingMinerals_native(pointer); - } - - public boolean isCloaked() { - return isCloaked_native(pointer); - } - - public boolean isCompleted() { - return isCompleted_native(pointer); - } - - public boolean isConstructing() { - return isConstructing_native(pointer); - } - - public boolean isDefenseMatrixed() { - return isDefenseMatrixed_native(pointer); - } - - public boolean isDetected() { - return isDetected_native(pointer); - } - - public boolean isEnsnared() { - return isEnsnared_native(pointer); - } - - public boolean isFollowing() { - return isFollowing_native(pointer); - } - - public boolean isGatheringGas() { - return isGatheringGas_native(pointer); - } - - public boolean isGatheringMinerals() { - return isGatheringMinerals_native(pointer); - } - - public boolean isHallucination() { - return isHallucination_native(pointer); - } - - public boolean isHoldingPosition() { - return isHoldingPosition_native(pointer); - } - - public boolean isIdle() { - return isIdle_native(pointer); - } - - public boolean isInterruptible() { - return isInterruptible_native(pointer); - } - - public boolean isInvincible() { - return isInvincible_native(pointer); - } - - public boolean isInWeaponRange(Unit target) { - return isInWeaponRange_native(pointer, target); - } - - public boolean isIrradiated() { - return isIrradiated_native(pointer); - } - - public boolean isLifted() { - return isLifted_native(pointer); - } - - public boolean isLoaded() { - return isLoaded_native(pointer); - } - - public boolean isLockedDown() { - return isLockedDown_native(pointer); - } - - public boolean isMaelstrommed() { - return isMaelstrommed_native(pointer); - } - - public boolean isMorphing() { - return isMorphing_native(pointer); - } - - public boolean isMoving() { - return isMoving_native(pointer); - } - - public boolean isParasited() { - return isParasited_native(pointer); - } - - public boolean isPatrolling() { - return isPatrolling_native(pointer); - } - - public boolean isPlagued() { - return isPlagued_native(pointer); - } - - public boolean isRepairing() { - return isRepairing_native(pointer); - } - - public boolean isResearching() { - return isResearching_native(pointer); - } - - public boolean isSelected() { - return isSelected_native(pointer); - } - - public boolean isSieged() { - return isSieged_native(pointer); - } - - public boolean isStartingAttack() { - return isStartingAttack_native(pointer); - } - - public boolean isStasised() { - return isStasised_native(pointer); - } - - public boolean isStimmed() { - return isStimmed_native(pointer); - } - - public boolean isStuck() { - return isStuck_native(pointer); - } - - public boolean isTraining() { - return isTraining_native(pointer); - } - - public boolean isUnderAttack() { - return isUnderAttack_native(pointer); - } - - public boolean isUnderDarkSwarm() { - return isUnderDarkSwarm_native(pointer); - } - - public boolean isUnderDisruptionWeb() { - return isUnderDisruptionWeb_native(pointer); - } - - public boolean isUnderStorm() { - return isUnderStorm_native(pointer); - } - - public boolean isUnpowered() { - return isUnpowered_native(pointer); - } - - public boolean isUpgrading() { - return isUpgrading_native(pointer); - } - - public boolean isVisible() { - return isVisible_native(pointer); - } - - public boolean isVisible(Player player) { - return isVisible_native(pointer, player); - } - - public boolean canIssueCommand(UnitCommand command) { - return canIssueCommand_native(pointer, command); - } - - public boolean issueCommand(UnitCommand command) { - return issueCommand_native(pointer, command); - } - - public boolean attack(Position target) { - return attack_native(pointer, target); - } - - public boolean attack(Position target, boolean shiftQueueCommand) { - return attack_native(pointer, target, shiftQueueCommand); - } - - public boolean attack(Unit target) { - return attack_native(pointer, target); - } - - public boolean attack(Unit target, boolean shiftQueueCommand) { - return attack_native(pointer, target, shiftQueueCommand); - } - - public boolean build(TilePosition target, UnitType type) { - return build_native(pointer, target, type); - } - - public boolean buildAddon(UnitType type) { - return buildAddon_native(pointer, type); - } - - public boolean train(UnitType type) { - return train_native(pointer, type); - } - - public boolean morph(UnitType type) { - return morph_native(pointer, type); - } - - public boolean research(TechType tech) { - return research_native(pointer, tech); - } - - public boolean upgrade(UpgradeType upgrade) { - return upgrade_native(pointer, upgrade); - } - - public boolean setRallyPoint(Position target) { - return setRallyPoint_native(pointer, target); - } - - public boolean setRallyPoint(Unit target) { - return setRallyPoint_native(pointer, target); - } - - public boolean move(Position target) { - return move_native(pointer, target); - } - - public boolean move(Position target, boolean shiftQueueCommand) { - return move_native(pointer, target, shiftQueueCommand); - } - - public boolean patrol(Position target) { - return patrol_native(pointer, target); - } - - public boolean patrol(Position target, boolean shiftQueueCommand) { - return patrol_native(pointer, target, shiftQueueCommand); - } - - public boolean holdPosition() { - return holdPosition_native(pointer); - } - - public boolean holdPosition(boolean shiftQueueCommand) { - return holdPosition_native(pointer, shiftQueueCommand); - } - - public boolean stop() { - return stop_native(pointer); - } - - public boolean stop(boolean shiftQueueCommand) { - return stop_native(pointer, shiftQueueCommand); - } - - public boolean follow(Unit target) { - return follow_native(pointer, target); - } - - public boolean follow(Unit target, boolean shiftQueueCommand) { - return follow_native(pointer, target, shiftQueueCommand); - } - - public boolean gather(Unit target) { - return gather_native(pointer, target); - } - - public boolean gather(Unit target, boolean shiftQueueCommand) { - return gather_native(pointer, target, shiftQueueCommand); - } - - public boolean returnCargo() { - return returnCargo_native(pointer); - } - - public boolean returnCargo(boolean shiftQueueCommand) { - return returnCargo_native(pointer, shiftQueueCommand); - } - - public boolean repair(Unit target) { - return repair_native(pointer, target); - } - - public boolean repair(Unit target, boolean shiftQueueCommand) { - return repair_native(pointer, target, shiftQueueCommand); - } - - public boolean burrow() { - return burrow_native(pointer); - } - - public boolean unburrow() { - return unburrow_native(pointer); - } - - public boolean cloak() { - return cloak_native(pointer); - } - - public boolean decloak() { - return decloak_native(pointer); - } - - public boolean siege() { - return siege_native(pointer); - } - - public boolean unsiege() { - return unsiege_native(pointer); - } - - public boolean lift() { - return lift_native(pointer); - } - - public boolean land(TilePosition target) { - return land_native(pointer, target); - } - - public boolean load(Unit target) { - return load_native(pointer, target); - } - - public boolean load(Unit target, boolean shiftQueueCommand) { - return load_native(pointer, target, shiftQueueCommand); - } - - public boolean unload(Unit target) { - return unload_native(pointer, target); - } - - public boolean unloadAll() { - return unloadAll_native(pointer); - } - - public boolean unloadAll(boolean shiftQueueCommand) { - return unloadAll_native(pointer, shiftQueueCommand); - } - - public boolean unloadAll(Position target) { - return unloadAll_native(pointer, target); - } - - public boolean unloadAll(Position target, boolean shiftQueueCommand) { - return unloadAll_native(pointer, target, shiftQueueCommand); - } - - public boolean rightClick(Position target) { - return rightClick_native(pointer, target); - } - - public boolean rightClick(Position target, boolean shiftQueueCommand) { - return rightClick_native(pointer, target, shiftQueueCommand); - } - - public boolean rightClick(Unit target) { - return rightClick_native(pointer, target); - } - - public boolean rightClick(Unit target, boolean shiftQueueCommand) { - return rightClick_native(pointer, target, shiftQueueCommand); - } - - public boolean haltConstruction() { - return haltConstruction_native(pointer); - } - - public boolean cancelConstruction() { - return cancelConstruction_native(pointer); - } - - public boolean cancelAddon() { - return cancelAddon_native(pointer); - } - - public boolean cancelTrain() { - return cancelTrain_native(pointer); - } - - public boolean cancelTrain(int slot) { - return cancelTrain_native(pointer, slot); - } - - public boolean cancelMorph() { - return cancelMorph_native(pointer); - } - - public boolean cancelResearch() { - return cancelResearch_native(pointer); - } - - public boolean cancelUpgrade() { - return cancelUpgrade_native(pointer); - } - - public boolean useTech(TechType tech) { - return useTech_native(pointer, tech); - } - - public boolean useTech(TechType tech, Position target) { - return useTech_native(pointer, tech, target); - } - - public boolean useTech(TechType tech, Unit target) { - return useTech_native(pointer, tech, target); - } - - public boolean placeCOP(TilePosition target) { - return placeCOP_native(pointer, target); - } - - - private static Map instances = new HashMap(); - - private Unit(long pointer) { - this.pointer = pointer; - } - - private static Unit get(long pointer) { - if (pointer == 0 ) { - return null; - } - Unit instance = instances.get(pointer); - if (instance == null ) { - instance = new Unit(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native int getID_native(long pointer); - - private native int getReplayID_native(long pointer); - - private native Player getPlayer_native(long pointer); - - private native UnitType getType_native(long pointer); - - private native Position getPosition_native(long pointer); - - private native TilePosition getTilePosition_native(long pointer); - - private native double getAngle_native(long pointer); - - private native double getVelocityX_native(long pointer); - - private native double getVelocityY_native(long pointer); - - private native Region getRegion_native(long pointer); - - private native int getLeft_native(long pointer); - - private native int getTop_native(long pointer); - - private native int getRight_native(long pointer); - - private native int getBottom_native(long pointer); - - private native int getHitPoints_native(long pointer); - - private native int getShields_native(long pointer); - - private native int getEnergy_native(long pointer); - - private native int getResources_native(long pointer); - - private native int getResourceGroup_native(long pointer); - - private native int getDistance_native(long pointer, Unit target); - - private native int getDistance_native(long pointer, Position target); - - private native boolean hasPath_native(long pointer, Unit target); - - private native boolean hasPath_native(long pointer, Position target); - - private native int getLastCommandFrame_native(long pointer); - - private native Player getLastAttackingPlayer_native(long pointer); - - private native int getUpgradeLevel_native(long pointer, UpgradeType upgrade); - - private native UnitType getInitialType_native(long pointer); - - private native Position getInitialPosition_native(long pointer); - - private native TilePosition getInitialTilePosition_native(long pointer); - - private native int getInitialHitPoints_native(long pointer); - - private native int getInitialResources_native(long pointer); - - private native int getKillCount_native(long pointer); - - private native int getAcidSporeCount_native(long pointer); - - private native int getInterceptorCount_native(long pointer); - - private native int getScarabCount_native(long pointer); - - private native int getSpiderMineCount_native(long pointer); - - private native int getGroundWeaponCooldown_native(long pointer); - - private native int getAirWeaponCooldown_native(long pointer); - - private native int getSpellCooldown_native(long pointer); - - private native int getDefenseMatrixPoints_native(long pointer); - - private native int getDefenseMatrixTimer_native(long pointer); - - private native int getEnsnareTimer_native(long pointer); - - private native int getIrradiateTimer_native(long pointer); - - private native int getLockdownTimer_native(long pointer); - - private native int getMaelstromTimer_native(long pointer); - - private native int getOrderTimer_native(long pointer); - - private native int getPlagueTimer_native(long pointer); - - private native int getRemoveTimer_native(long pointer); - - private native int getStasisTimer_native(long pointer); - - private native int getStimTimer_native(long pointer); - - private native UnitType getBuildType_native(long pointer); - - private native TechType getTech_native(long pointer); - - private native UpgradeType getUpgrade_native(long pointer); - - private native int getRemainingBuildTime_native(long pointer); - - private native int getRemainingTrainTime_native(long pointer); - - private native int getRemainingResearchTime_native(long pointer); - - private native int getRemainingUpgradeTime_native(long pointer); - - private native Unit getBuildUnit_native(long pointer); - - private native Unit getTarget_native(long pointer); - - private native Position getTargetPosition_native(long pointer); - - private native Order getOrder_native(long pointer); - - private native Order getSecondaryOrder_native(long pointer); - - private native Unit getOrderTarget_native(long pointer); - - private native Position getOrderTargetPosition_native(long pointer); - - private native Position getRallyPosition_native(long pointer); - - private native Unit getRallyUnit_native(long pointer); - - private native Unit getAddon_native(long pointer); - - private native Unit getNydusExit_native(long pointer); - - private native Unit getPowerUp_native(long pointer); - - private native Unit getTransport_native(long pointer); - - private native List getLoadedUnits_native(long pointer); - - private native Unit getCarrier_native(long pointer); - - private native List getInterceptors_native(long pointer); - - private native Unit getHatchery_native(long pointer); - - private native List getLarva_native(long pointer); - - private native List getUnitsInRadius_native(long pointer, int radius); - - private native List getUnitsInWeaponRange_native(long pointer, WeaponType weapon); - - private native boolean exists_native(long pointer); - - private native boolean hasNuke_native(long pointer); - - private native boolean isAccelerating_native(long pointer); - - private native boolean isAttacking_native(long pointer); - - private native boolean isAttackFrame_native(long pointer); - - private native boolean isBeingConstructed_native(long pointer); - - private native boolean isBeingGathered_native(long pointer); - - private native boolean isBeingHealed_native(long pointer); - - private native boolean isBlind_native(long pointer); - - private native boolean isBraking_native(long pointer); - - private native boolean isBurrowed_native(long pointer); - - private native boolean isCarryingGas_native(long pointer); - - private native boolean isCarryingMinerals_native(long pointer); - - private native boolean isCloaked_native(long pointer); - - private native boolean isCompleted_native(long pointer); - - private native boolean isConstructing_native(long pointer); - - private native boolean isDefenseMatrixed_native(long pointer); - - private native boolean isDetected_native(long pointer); - - private native boolean isEnsnared_native(long pointer); - - private native boolean isFollowing_native(long pointer); - - private native boolean isGatheringGas_native(long pointer); - - private native boolean isGatheringMinerals_native(long pointer); - - private native boolean isHallucination_native(long pointer); - - private native boolean isHoldingPosition_native(long pointer); - - private native boolean isIdle_native(long pointer); - - private native boolean isInterruptible_native(long pointer); - - private native boolean isInvincible_native(long pointer); - - private native boolean isInWeaponRange_native(long pointer, Unit target); - - private native boolean isIrradiated_native(long pointer); - - private native boolean isLifted_native(long pointer); - - private native boolean isLoaded_native(long pointer); - - private native boolean isLockedDown_native(long pointer); - - private native boolean isMaelstrommed_native(long pointer); - - private native boolean isMorphing_native(long pointer); - - private native boolean isMoving_native(long pointer); - - private native boolean isParasited_native(long pointer); - - private native boolean isPatrolling_native(long pointer); - - private native boolean isPlagued_native(long pointer); - - private native boolean isRepairing_native(long pointer); - - private native boolean isResearching_native(long pointer); - - private native boolean isSelected_native(long pointer); - - private native boolean isSieged_native(long pointer); - - private native boolean isStartingAttack_native(long pointer); - - private native boolean isStasised_native(long pointer); - - private native boolean isStimmed_native(long pointer); - - private native boolean isStuck_native(long pointer); - - private native boolean isTraining_native(long pointer); - - private native boolean isUnderAttack_native(long pointer); - - private native boolean isUnderDarkSwarm_native(long pointer); - - private native boolean isUnderDisruptionWeb_native(long pointer); - - private native boolean isUnderStorm_native(long pointer); - - private native boolean isUnpowered_native(long pointer); - - private native boolean isUpgrading_native(long pointer); - - private native boolean isVisible_native(long pointer); - - private native boolean isVisible_native(long pointer, Player player); - - private native boolean canIssueCommand_native(long pointer, UnitCommand command); - - private native boolean issueCommand_native(long pointer, UnitCommand command); - - private native boolean attack_native(long pointer, Position target); - - private native boolean attack_native(long pointer, Position target, boolean shiftQueueCommand); - - private native boolean attack_native(long pointer, Unit target); - - private native boolean attack_native(long pointer, Unit target, boolean shiftQueueCommand); - - private native boolean build_native(long pointer, TilePosition target, UnitType type); - - private native boolean buildAddon_native(long pointer, UnitType type); - - private native boolean train_native(long pointer, UnitType type); - - private native boolean morph_native(long pointer, UnitType type); - - private native boolean research_native(long pointer, TechType tech); - - private native boolean upgrade_native(long pointer, UpgradeType upgrade); - - private native boolean setRallyPoint_native(long pointer, Position target); - - private native boolean setRallyPoint_native(long pointer, Unit target); - - private native boolean move_native(long pointer, Position target); - - private native boolean move_native(long pointer, Position target, boolean shiftQueueCommand); - - private native boolean patrol_native(long pointer, Position target); - - private native boolean patrol_native(long pointer, Position target, boolean shiftQueueCommand); - - private native boolean holdPosition_native(long pointer); - - private native boolean holdPosition_native(long pointer, boolean shiftQueueCommand); - - private native boolean stop_native(long pointer); - - private native boolean stop_native(long pointer, boolean shiftQueueCommand); - - private native boolean follow_native(long pointer, Unit target); - - private native boolean follow_native(long pointer, Unit target, boolean shiftQueueCommand); - - private native boolean gather_native(long pointer, Unit target); - - private native boolean gather_native(long pointer, Unit target, boolean shiftQueueCommand); - - private native boolean returnCargo_native(long pointer); - - private native boolean returnCargo_native(long pointer, boolean shiftQueueCommand); - - private native boolean repair_native(long pointer, Unit target); - - private native boolean repair_native(long pointer, Unit target, boolean shiftQueueCommand); - - private native boolean burrow_native(long pointer); - - private native boolean unburrow_native(long pointer); - - private native boolean cloak_native(long pointer); - - private native boolean decloak_native(long pointer); - - private native boolean siege_native(long pointer); - - private native boolean unsiege_native(long pointer); - - private native boolean lift_native(long pointer); - - private native boolean land_native(long pointer, TilePosition target); - - private native boolean load_native(long pointer, Unit target); - - private native boolean load_native(long pointer, Unit target, boolean shiftQueueCommand); - - private native boolean unload_native(long pointer, Unit target); - - private native boolean unloadAll_native(long pointer); - - private native boolean unloadAll_native(long pointer, boolean shiftQueueCommand); - - private native boolean unloadAll_native(long pointer, Position target); - - private native boolean unloadAll_native(long pointer, Position target, boolean shiftQueueCommand); - - private native boolean rightClick_native(long pointer, Position target); - - private native boolean rightClick_native(long pointer, Position target, boolean shiftQueueCommand); - - private native boolean rightClick_native(long pointer, Unit target); - - private native boolean rightClick_native(long pointer, Unit target, boolean shiftQueueCommand); - - private native boolean haltConstruction_native(long pointer); - - private native boolean cancelConstruction_native(long pointer); - - private native boolean cancelAddon_native(long pointer); - - private native boolean cancelTrain_native(long pointer); - - private native boolean cancelTrain_native(long pointer, int slot); - - private native boolean cancelMorph_native(long pointer); - - private native boolean cancelResearch_native(long pointer); - - private native boolean cancelUpgrade_native(long pointer); - - private native boolean useTech_native(long pointer, TechType tech); - - private native boolean useTech_native(long pointer, TechType tech, Position target); - - private native boolean useTech_native(long pointer, TechType tech, Unit target); - - private native boolean placeCOP_native(long pointer, TilePosition target); - - -} diff --git a/bwapi/UnitCommand.java b/bwapi/UnitCommand.java deleted file mode 100644 index 75556ff..0000000 --- a/bwapi/UnitCommand.java +++ /dev/null @@ -1,40 +0,0 @@ -package bwapi; - -import bwapi.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class UnitCommand { - - public UnitCommandType getType() { - return getType_native(pointer); - } - - - private static Map instances = new HashMap(); - - private UnitCommand(long pointer) { - this.pointer = pointer; - } - - private static UnitCommand get(long pointer) { - if (pointer == 0 ) { - return null; - } - UnitCommand instance = instances.get(pointer); - if (instance == null ) { - instance = new UnitCommand(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native UnitCommandType getType_native(long pointer); - - -} diff --git a/bwapi/UnitCommandType.java b/bwapi/UnitCommandType.java deleted file mode 100644 index 8a0454e..0000000 --- a/bwapi/UnitCommandType.java +++ /dev/null @@ -1,136 +0,0 @@ -package bwapi; - -import bwapi.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class UnitCommandType { - - public String c_str() { - return c_str_native(pointer); - } - - public String toString(){ - return c_str(); - } - - public static UnitCommandType Attack_Move; - - public static UnitCommandType Attack_Unit; - - public static UnitCommandType Build; - - public static UnitCommandType Build_Addon; - - public static UnitCommandType Train; - - public static UnitCommandType Morph; - - public static UnitCommandType Research; - - public static UnitCommandType Upgrade; - - public static UnitCommandType Set_Rally_Position; - - public static UnitCommandType Set_Rally_Unit; - - public static UnitCommandType Move; - - public static UnitCommandType Patrol; - - public static UnitCommandType Hold_Position; - - public static UnitCommandType Stop; - - public static UnitCommandType Follow; - - public static UnitCommandType Gather; - - public static UnitCommandType Return_Cargo; - - public static UnitCommandType Repair; - - public static UnitCommandType Burrow; - - public static UnitCommandType Unburrow; - - public static UnitCommandType Cloak; - - public static UnitCommandType Decloak; - - public static UnitCommandType Siege; - - public static UnitCommandType Unsiege; - - public static UnitCommandType Lift; - - public static UnitCommandType Land; - - public static UnitCommandType Load; - - public static UnitCommandType Unload; - - public static UnitCommandType Unload_All; - - public static UnitCommandType Unload_All_Position; - - public static UnitCommandType Right_Click_Position; - - public static UnitCommandType Right_Click_Unit; - - public static UnitCommandType Halt_Construction; - - public static UnitCommandType Cancel_Construction; - - public static UnitCommandType Cancel_Addon; - - public static UnitCommandType Cancel_Train; - - public static UnitCommandType Cancel_Train_Slot; - - public static UnitCommandType Cancel_Morph; - - public static UnitCommandType Cancel_Research; - - public static UnitCommandType Cancel_Upgrade; - - public static UnitCommandType Use_Tech; - - public static UnitCommandType Use_Tech_Position; - - public static UnitCommandType Use_Tech_Unit; - - public static UnitCommandType Place_COP; - - public static UnitCommandType None; - - public static UnitCommandType Unknown; - - - private static Map instances = new HashMap(); - - private UnitCommandType(long pointer) { - this.pointer = pointer; - } - - private static UnitCommandType get(long pointer) { - if (pointer == 0 ) { - return null; - } - UnitCommandType instance = instances.get(pointer); - if (instance == null ) { - instance = new UnitCommandType(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String c_str_native(long pointer); - - -} diff --git a/bwapi/UnitSizeType.java b/bwapi/UnitSizeType.java deleted file mode 100644 index 5207ba7..0000000 --- a/bwapi/UnitSizeType.java +++ /dev/null @@ -1,56 +0,0 @@ -package bwapi; - -import bwapi.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class UnitSizeType { - - public String c_str() { - return c_str_native(pointer); - } - - public String toString(){ - return c_str(); - } - - public static UnitSizeType Independent; - - public static UnitSizeType Small; - - public static UnitSizeType Medium; - - public static UnitSizeType Large; - - public static UnitSizeType None; - - public static UnitSizeType Unknown; - - - private static Map instances = new HashMap(); - - private UnitSizeType(long pointer) { - this.pointer = pointer; - } - - private static UnitSizeType get(long pointer) { - if (pointer == 0 ) { - return null; - } - UnitSizeType instance = instances.get(pointer); - if (instance == null ) { - instance = new UnitSizeType(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String c_str_native(long pointer); - - -} diff --git a/bwapi/UnitType.java b/bwapi/UnitType.java deleted file mode 100644 index 988e42d..0000000 --- a/bwapi/UnitType.java +++ /dev/null @@ -1,886 +0,0 @@ -package bwapi; - -import bwapi.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class UnitType { - - public String c_str() { - return c_str_native(pointer); - } - - public String toString(){ - return c_str(); - } - - public Race getRace() { - return getRace_native(pointer); - } - - public TechType requiredTech() { - return requiredTech_native(pointer); - } - - public TechType cloakingTech() { - return cloakingTech_native(pointer); - } - - public List abilities() { - return abilities_native(pointer); - } - - public List upgrades() { - return upgrades_native(pointer); - } - - public UpgradeType armorUpgrade() { - return armorUpgrade_native(pointer); - } - - public int maxHitPoints() { - return maxHitPoints_native(pointer); - } - - public int maxShields() { - return maxShields_native(pointer); - } - - public int maxEnergy() { - return maxEnergy_native(pointer); - } - - public int armor() { - return armor_native(pointer); - } - - public int mineralPrice() { - return mineralPrice_native(pointer); - } - - public int gasPrice() { - return gasPrice_native(pointer); - } - - public int buildTime() { - return buildTime_native(pointer); - } - - public int supplyRequired() { - return supplyRequired_native(pointer); - } - - public int supplyProvided() { - return supplyProvided_native(pointer); - } - - public int spaceRequired() { - return spaceRequired_native(pointer); - } - - public int spaceProvided() { - return spaceProvided_native(pointer); - } - - public int buildScore() { - return buildScore_native(pointer); - } - - public int destroyScore() { - return destroyScore_native(pointer); - } - - public UnitSizeType size() { - return size_native(pointer); - } - - public int tileWidth() { - return tileWidth_native(pointer); - } - - public int tileHeight() { - return tileHeight_native(pointer); - } - - public int dimensionLeft() { - return dimensionLeft_native(pointer); - } - - public int dimensionUp() { - return dimensionUp_native(pointer); - } - - public int dimensionRight() { - return dimensionRight_native(pointer); - } - - public int dimensionDown() { - return dimensionDown_native(pointer); - } - - public int seekRange() { - return seekRange_native(pointer); - } - - public int sightRange() { - return sightRange_native(pointer); - } - - public WeaponType groundWeapon() { - return groundWeapon_native(pointer); - } - - public int maxGroundHits() { - return maxGroundHits_native(pointer); - } - - public WeaponType airWeapon() { - return airWeapon_native(pointer); - } - - public int maxAirHits() { - return maxAirHits_native(pointer); - } - - public double topSpeed() { - return topSpeed_native(pointer); - } - - public int acceleration() { - return acceleration_native(pointer); - } - - public int haltDistance() { - return haltDistance_native(pointer); - } - - public int turnRadius() { - return turnRadius_native(pointer); - } - - public boolean canProduce() { - return canProduce_native(pointer); - } - - public boolean canAttack() { - return canAttack_native(pointer); - } - - public boolean canMove() { - return canMove_native(pointer); - } - - public boolean isFlyer() { - return isFlyer_native(pointer); - } - - public boolean regeneratesHP() { - return regeneratesHP_native(pointer); - } - - public boolean isSpellcaster() { - return isSpellcaster_native(pointer); - } - - public boolean hasPermanentCloak() { - return hasPermanentCloak_native(pointer); - } - - public boolean isInvincible() { - return isInvincible_native(pointer); - } - - public boolean isOrganic() { - return isOrganic_native(pointer); - } - - public boolean isMechanical() { - return isMechanical_native(pointer); - } - - public boolean isRobotic() { - return isRobotic_native(pointer); - } - - public boolean isDetector() { - return isDetector_native(pointer); - } - - public boolean isResourceContainer() { - return isResourceContainer_native(pointer); - } - - public boolean isResourceDepot() { - return isResourceDepot_native(pointer); - } - - public boolean isRefinery() { - return isRefinery_native(pointer); - } - - public boolean isWorker() { - return isWorker_native(pointer); - } - - public boolean requiresPsi() { - return requiresPsi_native(pointer); - } - - public boolean requiresCreep() { - return requiresCreep_native(pointer); - } - - public boolean isTwoUnitsInOneEgg() { - return isTwoUnitsInOneEgg_native(pointer); - } - - public boolean isBurrowable() { - return isBurrowable_native(pointer); - } - - public boolean isCloakable() { - return isCloakable_native(pointer); - } - - public boolean isBuilding() { - return isBuilding_native(pointer); - } - - public boolean isAddon() { - return isAddon_native(pointer); - } - - public boolean isFlyingBuilding() { - return isFlyingBuilding_native(pointer); - } - - public boolean isNeutral() { - return isNeutral_native(pointer); - } - - public boolean isHero() { - return isHero_native(pointer); - } - - public boolean isPowerup() { - return isPowerup_native(pointer); - } - - public boolean isBeacon() { - return isBeacon_native(pointer); - } - - public boolean isFlagBeacon() { - return isFlagBeacon_native(pointer); - } - - public boolean isSpecialBuilding() { - return isSpecialBuilding_native(pointer); - } - - public boolean isSpell() { - return isSpell_native(pointer); - } - - public boolean producesLarva() { - return producesLarva_native(pointer); - } - - public boolean isMineralField() { - return isMineralField_native(pointer); - } - - public boolean canBuildAddon() { - return canBuildAddon_native(pointer); - } - - public static UnitType Terran_Marine; - - public static UnitType Hero_Jim_Raynor_Marine; - - public static UnitType Terran_Ghost; - - public static UnitType Hero_Sarah_Kerrigan; - - public static UnitType Hero_Samir_Duran; - - public static UnitType Hero_Infested_Duran; - - public static UnitType Hero_Alexei_Stukov; - - public static UnitType Terran_Vulture; - - public static UnitType Hero_Jim_Raynor_Vulture; - - public static UnitType Terran_Goliath; - - public static UnitType Hero_Alan_Schezar; - - public static UnitType Terran_Siege_Tank_Tank_Mode; - - public static UnitType Hero_Edmund_Duke_Tank_Mode; - - public static UnitType Terran_SCV; - - public static UnitType Terran_Wraith; - - public static UnitType Hero_Tom_Kazansky; - - public static UnitType Terran_Science_Vessel; - - public static UnitType Hero_Magellan; - - public static UnitType Terran_Dropship; - - public static UnitType Terran_Battlecruiser; - - public static UnitType Hero_Arcturus_Mengsk; - - public static UnitType Hero_Hyperion; - - public static UnitType Hero_Norad_II; - - public static UnitType Hero_Gerard_DuGalle; - - public static UnitType Terran_Vulture_Spider_Mine; - - public static UnitType Terran_Nuclear_Missile; - - public static UnitType Terran_Siege_Tank_Siege_Mode; - - public static UnitType Hero_Edmund_Duke_Siege_Mode; - - public static UnitType Terran_Firebat; - - public static UnitType Hero_Gui_Montag; - - public static UnitType Spell_Scanner_Sweep; - - public static UnitType Terran_Medic; - - public static UnitType Terran_Civilian; - - public static UnitType Zerg_Larva; - - public static UnitType Zerg_Egg; - - public static UnitType Zerg_Zergling; - - public static UnitType Hero_Devouring_One; - - public static UnitType Hero_Infested_Kerrigan; - - public static UnitType Zerg_Hydralisk; - - public static UnitType Hero_Hunter_Killer; - - public static UnitType Zerg_Ultralisk; - - public static UnitType Hero_Torrasque; - - public static UnitType Zerg_Broodling; - - public static UnitType Zerg_Drone; - - public static UnitType Zerg_Overlord; - - public static UnitType Hero_Yggdrasill; - - public static UnitType Zerg_Mutalisk; - - public static UnitType Hero_Kukulza_Mutalisk; - - public static UnitType Zerg_Guardian; - - public static UnitType Hero_Kukulza_Guardian; - - public static UnitType Zerg_Queen; - - public static UnitType Hero_Matriarch; - - public static UnitType Zerg_Defiler; - - public static UnitType Hero_Unclean_One; - - public static UnitType Zerg_Scourge; - - public static UnitType Zerg_Infested_Terran; - - public static UnitType Terran_Valkyrie; - - public static UnitType Zerg_Cocoon; - - public static UnitType Protoss_Corsair; - - public static UnitType Hero_Raszagal; - - public static UnitType Protoss_Dark_Templar; - - public static UnitType Hero_Dark_Templar; - - public static UnitType Hero_Zeratul; - - public static UnitType Zerg_Devourer; - - public static UnitType Protoss_Dark_Archon; - - public static UnitType Protoss_Probe; - - public static UnitType Protoss_Zealot; - - public static UnitType Hero_Fenix_Zealot; - - public static UnitType Protoss_Dragoon; - - public static UnitType Hero_Fenix_Dragoon; - - public static UnitType Protoss_High_Templar; - - public static UnitType Hero_Tassadar; - - public static UnitType Hero_Aldaris; - - public static UnitType Protoss_Archon; - - public static UnitType Hero_Tassadar_Zeratul_Archon; - - public static UnitType Protoss_Shuttle; - - public static UnitType Protoss_Scout; - - public static UnitType Hero_Mojo; - - public static UnitType Hero_Artanis; - - public static UnitType Protoss_Arbiter; - - public static UnitType Hero_Danimoth; - - public static UnitType Protoss_Carrier; - - public static UnitType Hero_Gantrithor; - - public static UnitType Protoss_Interceptor; - - public static UnitType Protoss_Reaver; - - public static UnitType Hero_Warbringer; - - public static UnitType Protoss_Observer; - - public static UnitType Protoss_Scarab; - - public static UnitType Critter_Rhynadon; - - public static UnitType Critter_Bengalaas; - - public static UnitType Special_Cargo_Ship; - - public static UnitType Special_Mercenary_Gunship; - - public static UnitType Critter_Scantid; - - public static UnitType Critter_Kakaru; - - public static UnitType Critter_Ragnasaur; - - public static UnitType Critter_Ursadon; - - public static UnitType Zerg_Lurker_Egg; - - public static UnitType Zerg_Lurker; - - public static UnitType Spell_Disruption_Web; - - public static UnitType Terran_Command_Center; - - public static UnitType Terran_Comsat_Station; - - public static UnitType Terran_Nuclear_Silo; - - public static UnitType Terran_Supply_Depot; - - public static UnitType Terran_Refinery; - - public static UnitType Terran_Barracks; - - public static UnitType Terran_Academy; - - public static UnitType Terran_Factory; - - public static UnitType Terran_Starport; - - public static UnitType Terran_Control_Tower; - - public static UnitType Terran_Science_Facility; - - public static UnitType Terran_Covert_Ops; - - public static UnitType Terran_Physics_Lab; - - public static UnitType Terran_Machine_Shop; - - public static UnitType Terran_Engineering_Bay; - - public static UnitType Terran_Armory; - - public static UnitType Terran_Missile_Turret; - - public static UnitType Terran_Bunker; - - public static UnitType Special_Crashed_Norad_II; - - public static UnitType Special_Ion_Cannon; - - public static UnitType Zerg_Infested_Command_Center; - - public static UnitType Zerg_Hatchery; - - public static UnitType Zerg_Lair; - - public static UnitType Zerg_Hive; - - public static UnitType Zerg_Nydus_Canal; - - public static UnitType Zerg_Hydralisk_Den; - - public static UnitType Zerg_Defiler_Mound; - - public static UnitType Zerg_Greater_Spire; - - public static UnitType Zerg_Queens_Nest; - - public static UnitType Zerg_Evolution_Chamber; - - public static UnitType Zerg_Ultralisk_Cavern; - - public static UnitType Zerg_Spire; - - public static UnitType Zerg_Spawning_Pool; - - public static UnitType Zerg_Creep_Colony; - - public static UnitType Zerg_Spore_Colony; - - public static UnitType Zerg_Sunken_Colony; - - public static UnitType Special_Overmind_With_Shell; - - public static UnitType Special_Overmind; - - public static UnitType Zerg_Extractor; - - public static UnitType Special_Mature_Chrysalis; - - public static UnitType Special_Cerebrate; - - public static UnitType Special_Cerebrate_Daggoth; - - public static UnitType Protoss_Nexus; - - public static UnitType Protoss_Robotics_Facility; - - public static UnitType Protoss_Pylon; - - public static UnitType Protoss_Assimilator; - - public static UnitType Protoss_Observatory; - - public static UnitType Protoss_Gateway; - - public static UnitType Protoss_Photon_Cannon; - - public static UnitType Protoss_Citadel_of_Adun; - - public static UnitType Protoss_Cybernetics_Core; - - public static UnitType Protoss_Templar_Archives; - - public static UnitType Protoss_Forge; - - public static UnitType Protoss_Stargate; - - public static UnitType Special_Stasis_Cell_Prison; - - public static UnitType Protoss_Fleet_Beacon; - - public static UnitType Protoss_Arbiter_Tribunal; - - public static UnitType Protoss_Robotics_Support_Bay; - - public static UnitType Protoss_Shield_Battery; - - public static UnitType Special_Khaydarin_Crystal_Form; - - public static UnitType Special_Protoss_Temple; - - public static UnitType Special_XelNaga_Temple; - - public static UnitType Resource_Mineral_Field; - - public static UnitType Resource_Mineral_Field_Type_2; - - public static UnitType Resource_Mineral_Field_Type_3; - - public static UnitType Special_Independant_Starport; - - public static UnitType Resource_Vespene_Geyser; - - public static UnitType Special_Warp_Gate; - - public static UnitType Special_Psi_Disrupter; - - public static UnitType Special_Power_Generator; - - public static UnitType Special_Overmind_Cocoon; - - public static UnitType Special_Zerg_Beacon; - - public static UnitType Special_Terran_Beacon; - - public static UnitType Special_Protoss_Beacon; - - public static UnitType Special_Zerg_Flag_Beacon; - - public static UnitType Special_Terran_Flag_Beacon; - - public static UnitType Special_Protoss_Flag_Beacon; - - public static UnitType Spell_Dark_Swarm; - - public static UnitType Powerup_Uraj_Crystal; - - public static UnitType Powerup_Khalis_Crystal; - - public static UnitType Powerup_Flag; - - public static UnitType Powerup_Young_Chrysalis; - - public static UnitType Powerup_Psi_Emitter; - - public static UnitType Powerup_Data_Disk; - - public static UnitType Powerup_Khaydarin_Crystal; - - public static UnitType Powerup_Mineral_Cluster_Type_1; - - public static UnitType Powerup_Mineral_Cluster_Type_2; - - public static UnitType Powerup_Protoss_Gas_Orb_Type_1; - - public static UnitType Powerup_Protoss_Gas_Orb_Type_2; - - public static UnitType Powerup_Zerg_Gas_Sac_Type_1; - - public static UnitType Powerup_Zerg_Gas_Sac_Type_2; - - public static UnitType Powerup_Terran_Gas_Tank_Type_1; - - public static UnitType Powerup_Terran_Gas_Tank_Type_2; - - public static UnitType Special_Map_Revealer; - - public static UnitType Special_Floor_Missile_Trap; - - public static UnitType Special_Floor_Hatch; - - public static UnitType Special_Upper_Level_Door; - - public static UnitType Special_Right_Upper_Level_Door; - - public static UnitType Special_Pit_Door; - - public static UnitType Special_Right_Pit_Door; - - public static UnitType Special_Floor_Gun_Trap; - - public static UnitType Special_Wall_Missile_Trap; - - public static UnitType Special_Wall_Flame_Trap; - - public static UnitType Special_Right_Wall_Missile_Trap; - - public static UnitType Special_Right_Wall_Flame_Trap; - - public static UnitType Special_Start_Location; - - public static UnitType None; - - public static UnitType AllUnits; - - public static UnitType Men; - - public static UnitType Buildings; - - public static UnitType Factories; - - public static UnitType Unknown; - - - private static Map instances = new HashMap(); - - private UnitType(long pointer) { - this.pointer = pointer; - } - - private static UnitType get(long pointer) { - if (pointer == 0 ) { - return null; - } - UnitType instance = instances.get(pointer); - if (instance == null ) { - instance = new UnitType(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String c_str_native(long pointer); - - private native Race getRace_native(long pointer); - - private native TechType requiredTech_native(long pointer); - - private native TechType cloakingTech_native(long pointer); - - private native List abilities_native(long pointer); - - private native List upgrades_native(long pointer); - - private native UpgradeType armorUpgrade_native(long pointer); - - private native int maxHitPoints_native(long pointer); - - private native int maxShields_native(long pointer); - - private native int maxEnergy_native(long pointer); - - private native int armor_native(long pointer); - - private native int mineralPrice_native(long pointer); - - private native int gasPrice_native(long pointer); - - private native int buildTime_native(long pointer); - - private native int supplyRequired_native(long pointer); - - private native int supplyProvided_native(long pointer); - - private native int spaceRequired_native(long pointer); - - private native int spaceProvided_native(long pointer); - - private native int buildScore_native(long pointer); - - private native int destroyScore_native(long pointer); - - private native UnitSizeType size_native(long pointer); - - private native int tileWidth_native(long pointer); - - private native int tileHeight_native(long pointer); - - private native int dimensionLeft_native(long pointer); - - private native int dimensionUp_native(long pointer); - - private native int dimensionRight_native(long pointer); - - private native int dimensionDown_native(long pointer); - - private native int seekRange_native(long pointer); - - private native int sightRange_native(long pointer); - - private native WeaponType groundWeapon_native(long pointer); - - private native int maxGroundHits_native(long pointer); - - private native WeaponType airWeapon_native(long pointer); - - private native int maxAirHits_native(long pointer); - - private native double topSpeed_native(long pointer); - - private native int acceleration_native(long pointer); - - private native int haltDistance_native(long pointer); - - private native int turnRadius_native(long pointer); - - private native boolean canProduce_native(long pointer); - - private native boolean canAttack_native(long pointer); - - private native boolean canMove_native(long pointer); - - private native boolean isFlyer_native(long pointer); - - private native boolean regeneratesHP_native(long pointer); - - private native boolean isSpellcaster_native(long pointer); - - private native boolean hasPermanentCloak_native(long pointer); - - private native boolean isInvincible_native(long pointer); - - private native boolean isOrganic_native(long pointer); - - private native boolean isMechanical_native(long pointer); - - private native boolean isRobotic_native(long pointer); - - private native boolean isDetector_native(long pointer); - - private native boolean isResourceContainer_native(long pointer); - - private native boolean isResourceDepot_native(long pointer); - - private native boolean isRefinery_native(long pointer); - - private native boolean isWorker_native(long pointer); - - private native boolean requiresPsi_native(long pointer); - - private native boolean requiresCreep_native(long pointer); - - private native boolean isTwoUnitsInOneEgg_native(long pointer); - - private native boolean isBurrowable_native(long pointer); - - private native boolean isCloakable_native(long pointer); - - private native boolean isBuilding_native(long pointer); - - private native boolean isAddon_native(long pointer); - - private native boolean isFlyingBuilding_native(long pointer); - - private native boolean isNeutral_native(long pointer); - - private native boolean isHero_native(long pointer); - - private native boolean isPowerup_native(long pointer); - - private native boolean isBeacon_native(long pointer); - - private native boolean isFlagBeacon_native(long pointer); - - private native boolean isSpecialBuilding_native(long pointer); - - private native boolean isSpell_native(long pointer); - - private native boolean producesLarva_native(long pointer); - - private native boolean isMineralField_native(long pointer); - - private native boolean canBuildAddon_native(long pointer); - - -} diff --git a/bwapi/UpgradeType.java b/bwapi/UpgradeType.java deleted file mode 100644 index 81f6ecc..0000000 --- a/bwapi/UpgradeType.java +++ /dev/null @@ -1,238 +0,0 @@ -package bwapi; - -import bwapi.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class UpgradeType { - - public String c_str() { - return c_str_native(pointer); - } - - public String toString(){ - return c_str(); - } - - public Race getRace() { - return getRace_native(pointer); - } - - public int mineralPrice() { - return mineralPrice_native(pointer); - } - - public int mineralPrice(int level) { - return mineralPrice_native(pointer, level); - } - - public int mineralPriceFactor() { - return mineralPriceFactor_native(pointer); - } - - public int gasPrice() { - return gasPrice_native(pointer); - } - - public int gasPrice(int level) { - return gasPrice_native(pointer, level); - } - - public int gasPriceFactor() { - return gasPriceFactor_native(pointer); - } - - public int upgradeTime() { - return upgradeTime_native(pointer); - } - - public int upgradeTime(int level) { - return upgradeTime_native(pointer, level); - } - - public int upgradeTimeFactor() { - return upgradeTimeFactor_native(pointer); - } - - public int maxRepeats() { - return maxRepeats_native(pointer); - } - - public UnitType whatUpgrades() { - return whatUpgrades_native(pointer); - } - - public UnitType whatsRequired() { - return whatsRequired_native(pointer); - } - - public UnitType whatsRequired(int level) { - return whatsRequired_native(pointer, level); - } - - public List whatUses() { - return whatUses_native(pointer); - } - - public static UpgradeType Terran_Infantry_Armor; - - public static UpgradeType Terran_Vehicle_Plating; - - public static UpgradeType Terran_Ship_Plating; - - public static UpgradeType Zerg_Carapace; - - public static UpgradeType Zerg_Flyer_Carapace; - - public static UpgradeType Protoss_Ground_Armor; - - public static UpgradeType Protoss_Air_Armor; - - public static UpgradeType Terran_Infantry_Weapons; - - public static UpgradeType Terran_Vehicle_Weapons; - - public static UpgradeType Terran_Ship_Weapons; - - public static UpgradeType Zerg_Melee_Attacks; - - public static UpgradeType Zerg_Missile_Attacks; - - public static UpgradeType Zerg_Flyer_Attacks; - - public static UpgradeType Protoss_Ground_Weapons; - - public static UpgradeType Protoss_Air_Weapons; - - public static UpgradeType Protoss_Plasma_Shields; - - public static UpgradeType U_238_Shells; - - public static UpgradeType Ion_Thrusters; - - public static UpgradeType Titan_Reactor; - - public static UpgradeType Ocular_Implants; - - public static UpgradeType Moebius_Reactor; - - public static UpgradeType Apollo_Reactor; - - public static UpgradeType Colossus_Reactor; - - public static UpgradeType Ventral_Sacs; - - public static UpgradeType Antennae; - - public static UpgradeType Pneumatized_Carapace; - - public static UpgradeType Metabolic_Boost; - - public static UpgradeType Adrenal_Glands; - - public static UpgradeType Muscular_Augments; - - public static UpgradeType Grooved_Spines; - - public static UpgradeType Gamete_Meiosis; - - public static UpgradeType Metasynaptic_Node; - - public static UpgradeType Singularity_Charge; - - public static UpgradeType Leg_Enhancements; - - public static UpgradeType Scarab_Damage; - - public static UpgradeType Reaver_Capacity; - - public static UpgradeType Gravitic_Drive; - - public static UpgradeType Sensor_Array; - - public static UpgradeType Gravitic_Boosters; - - public static UpgradeType Khaydarin_Amulet; - - public static UpgradeType Apial_Sensors; - - public static UpgradeType Gravitic_Thrusters; - - public static UpgradeType Carrier_Capacity; - - public static UpgradeType Khaydarin_Core; - - public static UpgradeType Argus_Jewel; - - public static UpgradeType Argus_Talisman; - - public static UpgradeType Caduceus_Reactor; - - public static UpgradeType Chitinous_Plating; - - public static UpgradeType Anabolic_Synthesis; - - public static UpgradeType Charon_Boosters; - - public static UpgradeType None; - - public static UpgradeType Unknown; - - - private static Map instances = new HashMap(); - - private UpgradeType(long pointer) { - this.pointer = pointer; - } - - private static UpgradeType get(long pointer) { - if (pointer == 0 ) { - return null; - } - UpgradeType instance = instances.get(pointer); - if (instance == null ) { - instance = new UpgradeType(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String c_str_native(long pointer); - - private native Race getRace_native(long pointer); - - private native int mineralPrice_native(long pointer); - - private native int mineralPrice_native(long pointer, int level); - - private native int mineralPriceFactor_native(long pointer); - - private native int gasPrice_native(long pointer); - - private native int gasPrice_native(long pointer, int level); - - private native int gasPriceFactor_native(long pointer); - - private native int upgradeTime_native(long pointer); - - private native int upgradeTime_native(long pointer, int level); - - private native int upgradeTimeFactor_native(long pointer); - - private native int maxRepeats_native(long pointer); - - private native UnitType whatUpgrades_native(long pointer); - - private native UnitType whatsRequired_native(long pointer); - - private native UnitType whatsRequired_native(long pointer, int level); - - private native List whatUses_native(long pointer); - - -} diff --git a/bwapi/Utils.java b/bwapi/Utils.java deleted file mode 100644 index a597123..0000000 --- a/bwapi/Utils.java +++ /dev/null @@ -1,52 +0,0 @@ -package bwapi; - -import java.lang.String; -import java.lang.System; - -/** - * - */ -public class Utils { - - public static final byte Previous = 0x01; - public static final byte Cyan = 0x02; - public static final byte Yellow = 0x03; - public static final byte White = 0x04; - public static final byte Grey = 0x05; - public static final byte Red = 0x06; - public static final byte Green = 0x07; - public static final byte Red_P1 = 0x08; - public static final byte Tab = 0x09; - public static final byte Newline = 0x0A; - public static final byte Invisible_no_override = 0x0B; - public static final byte Remove_beyond = 0x0C; - public static final byte Clear_formatting = 0x0D; - public static final byte Blue = 0x0E; - public static final byte Teal = 0x0F; - public static final byte Purple = 0x10; - public static final byte Orange = 0x11; - public static final byte Right_Align = 0x12; - public static final byte Center_Align = 0x13; - public static final byte Invisible = 0x14; - public static final byte Brown = 0x15; - public static final byte White_p7 = 0x16; - public static final byte Yellow_p8 = 0x17; - public static final byte Green_p9 = 0x18; - public static final byte Brighter_Yellow = 0x19; - public static final byte Cyan_default = 0x1A; - public static final byte Pinkish = 0x1B; - public static final byte Dark_Cyan = 0x1C; - public static final byte Greygreen = 0x1D; - public static final byte Bluegrey = 0x1E; - public static final byte Turquoise = 0x1F; - - public static String formatText(String text, byte format){ - byte[] textData = text.getBytes(); - int textDataLength = text.length(); - - byte[] newTextData = new byte[textDataLength + 1]; - newTextData[0] = format; - System.arraycopy(textData, 0, newTextData, 1, textDataLength); - return new String(newTextData); - } -} \ No newline at end of file diff --git a/bwapi/WeaponType.java b/bwapi/WeaponType.java deleted file mode 100644 index a95c7ca..0000000 --- a/bwapi/WeaponType.java +++ /dev/null @@ -1,386 +0,0 @@ -package bwapi; - -import bwapi.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class WeaponType { - - public String c_str() { - return c_str_native(pointer); - } - - public String toString(){ - return c_str(); - } - - public TechType getTech() { - return getTech_native(pointer); - } - - public UnitType whatUses() { - return whatUses_native(pointer); - } - - public int damageAmount() { - return damageAmount_native(pointer); - } - - public int damageBonus() { - return damageBonus_native(pointer); - } - - public int damageCooldown() { - return damageCooldown_native(pointer); - } - - public int damageFactor() { - return damageFactor_native(pointer); - } - - public UpgradeType upgradeType() { - return upgradeType_native(pointer); - } - - public DamageType damageType() { - return damageType_native(pointer); - } - - public ExplosionType explosionType() { - return explosionType_native(pointer); - } - - public int minRange() { - return minRange_native(pointer); - } - - public int maxRange() { - return maxRange_native(pointer); - } - - public int innerSplashRadius() { - return innerSplashRadius_native(pointer); - } - - public int medianSplashRadius() { - return medianSplashRadius_native(pointer); - } - - public int outerSplashRadius() { - return outerSplashRadius_native(pointer); - } - - public boolean targetsAir() { - return targetsAir_native(pointer); - } - - public boolean targetsGround() { - return targetsGround_native(pointer); - } - - public boolean targetsMechanical() { - return targetsMechanical_native(pointer); - } - - public boolean targetsOrganic() { - return targetsOrganic_native(pointer); - } - - public boolean targetsNonBuilding() { - return targetsNonBuilding_native(pointer); - } - - public boolean targetsNonRobotic() { - return targetsNonRobotic_native(pointer); - } - - public boolean targetsTerrain() { - return targetsTerrain_native(pointer); - } - - public boolean targetsOrgOrMech() { - return targetsOrgOrMech_native(pointer); - } - - public boolean targetsOwn() { - return targetsOwn_native(pointer); - } - - public static WeaponType Gauss_Rifle; - - public static WeaponType Gauss_Rifle_Jim_Raynor; - - public static WeaponType C_10_Canister_Rifle; - - public static WeaponType C_10_Canister_Rifle_Sarah_Kerrigan; - - public static WeaponType C_10_Canister_Rifle_Samir_Duran; - - public static WeaponType C_10_Canister_Rifle_Infested_Duran; - - public static WeaponType C_10_Canister_Rifle_Alexei_Stukov; - - public static WeaponType Fragmentation_Grenade; - - public static WeaponType Fragmentation_Grenade_Jim_Raynor; - - public static WeaponType Spider_Mines; - - public static WeaponType Twin_Autocannons; - - public static WeaponType Twin_Autocannons_Alan_Schezar; - - public static WeaponType Hellfire_Missile_Pack; - - public static WeaponType Hellfire_Missile_Pack_Alan_Schezar; - - public static WeaponType Arclite_Cannon; - - public static WeaponType Arclite_Cannon_Edmund_Duke; - - public static WeaponType Fusion_Cutter; - - public static WeaponType Gemini_Missiles; - - public static WeaponType Gemini_Missiles_Tom_Kazansky; - - public static WeaponType Burst_Lasers; - - public static WeaponType Burst_Lasers_Tom_Kazansky; - - public static WeaponType ATS_Laser_Battery; - - public static WeaponType ATS_Laser_Battery_Hero; - - public static WeaponType ATS_Laser_Battery_Hyperion; - - public static WeaponType ATA_Laser_Battery; - - public static WeaponType ATA_Laser_Battery_Hero; - - public static WeaponType ATA_Laser_Battery_Hyperion; - - public static WeaponType Flame_Thrower; - - public static WeaponType Flame_Thrower_Gui_Montag; - - public static WeaponType Arclite_Shock_Cannon; - - public static WeaponType Arclite_Shock_Cannon_Edmund_Duke; - - public static WeaponType Longbolt_Missile; - - public static WeaponType Claws; - - public static WeaponType Claws_Devouring_One; - - public static WeaponType Claws_Infested_Kerrigan; - - public static WeaponType Needle_Spines; - - public static WeaponType Needle_Spines_Hunter_Killer; - - public static WeaponType Kaiser_Blades; - - public static WeaponType Kaiser_Blades_Torrasque; - - public static WeaponType Toxic_Spores; - - public static WeaponType Spines; - - public static WeaponType Acid_Spore; - - public static WeaponType Acid_Spore_Kukulza; - - public static WeaponType Glave_Wurm; - - public static WeaponType Glave_Wurm_Kukulza; - - public static WeaponType Seeker_Spores; - - public static WeaponType Subterranean_Tentacle; - - public static WeaponType Suicide_Infested_Terran; - - public static WeaponType Suicide_Scourge; - - public static WeaponType Particle_Beam; - - public static WeaponType Psi_Blades; - - public static WeaponType Psi_Blades_Fenix; - - public static WeaponType Phase_Disruptor; - - public static WeaponType Phase_Disruptor_Fenix; - - public static WeaponType Psi_Assault; - - public static WeaponType Psionic_Shockwave; - - public static WeaponType Psionic_Shockwave_TZ_Archon; - - public static WeaponType Dual_Photon_Blasters; - - public static WeaponType Dual_Photon_Blasters_Mojo; - - public static WeaponType Dual_Photon_Blasters_Artanis; - - public static WeaponType Anti_Matter_Missiles; - - public static WeaponType Anti_Matter_Missiles_Mojo; - - public static WeaponType Anti_Matter_Missiles_Artanis; - - public static WeaponType Phase_Disruptor_Cannon; - - public static WeaponType Phase_Disruptor_Cannon_Danimoth; - - public static WeaponType Pulse_Cannon; - - public static WeaponType STS_Photon_Cannon; - - public static WeaponType STA_Photon_Cannon; - - public static WeaponType Scarab; - - public static WeaponType Neutron_Flare; - - public static WeaponType Halo_Rockets; - - public static WeaponType Corrosive_Acid; - - public static WeaponType Subterranean_Spines; - - public static WeaponType Warp_Blades; - - public static WeaponType Warp_Blades_Hero; - - public static WeaponType Warp_Blades_Zeratul; - - public static WeaponType Independant_Laser_Battery; - - public static WeaponType Twin_Autocannons_Floor_Trap; - - public static WeaponType Hellfire_Missile_Pack_Wall_Trap; - - public static WeaponType Flame_Thrower_Wall_Trap; - - public static WeaponType Hellfire_Missile_Pack_Floor_Trap; - - public static WeaponType Yamato_Gun; - - public static WeaponType Nuclear_Strike; - - public static WeaponType Lockdown; - - public static WeaponType EMP_Shockwave; - - public static WeaponType Irradiate; - - public static WeaponType Parasite; - - public static WeaponType Spawn_Broodlings; - - public static WeaponType Ensnare; - - public static WeaponType Dark_Swarm; - - public static WeaponType Plague; - - public static WeaponType Consume; - - public static WeaponType Stasis_Field; - - public static WeaponType Psionic_Storm; - - public static WeaponType Disruption_Web; - - public static WeaponType Restoration; - - public static WeaponType Mind_Control; - - public static WeaponType Feedback; - - public static WeaponType Optical_Flare; - - public static WeaponType Maelstrom; - - public static WeaponType None; - - public static WeaponType Unknown; - - - private static Map instances = new HashMap(); - - private WeaponType(long pointer) { - this.pointer = pointer; - } - - private static WeaponType get(long pointer) { - if (pointer == 0 ) { - return null; - } - WeaponType instance = instances.get(pointer); - if (instance == null ) { - instance = new WeaponType(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String c_str_native(long pointer); - - private native TechType getTech_native(long pointer); - - private native UnitType whatUses_native(long pointer); - - private native int damageAmount_native(long pointer); - - private native int damageBonus_native(long pointer); - - private native int damageCooldown_native(long pointer); - - private native int damageFactor_native(long pointer); - - private native UpgradeType upgradeType_native(long pointer); - - private native DamageType damageType_native(long pointer); - - private native ExplosionType explosionType_native(long pointer); - - private native int minRange_native(long pointer); - - private native int maxRange_native(long pointer); - - private native int innerSplashRadius_native(long pointer); - - private native int medianSplashRadius_native(long pointer); - - private native int outerSplashRadius_native(long pointer); - - private native boolean targetsAir_native(long pointer); - - private native boolean targetsGround_native(long pointer); - - private native boolean targetsMechanical_native(long pointer); - - private native boolean targetsOrganic_native(long pointer); - - private native boolean targetsNonBuilding_native(long pointer); - - private native boolean targetsNonRobotic_native(long pointer); - - private native boolean targetsTerrain_native(long pointer); - - private native boolean targetsOrgOrMech_native(long pointer); - - private native boolean targetsOwn_native(long pointer); - - -} diff --git a/bwapi4/AIModule.java b/bwapi4/AIModule.java deleted file mode 100644 index ad9e0b6..0000000 --- a/bwapi4/AIModule.java +++ /dev/null @@ -1,130 +0,0 @@ -package bwapi4; - -import bwapi4.BWEventListener; - -/** - * This class receives all events from Broodwar. - * To process them, receive an AIModule's instance from {@link Mirror} and call {@link #setEventListener(bwapi.BWEventListener)} - * to set you own {@link BWEventListener listener}. - * There's also a stub class ({@link DefaultBWListener}) provided, so you don't have to implement all of the methods. - */ -public class AIModule { - - AIModule(){} - - private BWEventListener eventListener; - - public void setEventListener(BWEventListener eventListener) { - this.eventListener = eventListener; - } - - public void onStart() { - if (eventListener != null) { - eventListener.onStart(); - } - } - - public void onEnd(boolean isWinner) { - if (eventListener != null) { - eventListener.onEnd(isWinner); - } - } - - public void onFrame() { - if (eventListener != null) { - eventListener.onFrame(); - } - } - - public void onSendText(String text) { - if (eventListener != null) - { - eventListener.onSendText(text); - } - } - - public void onReceiveText(Player player, String text) { - if (eventListener != null) { - eventListener.onReceiveText(player, text); - } - } - - public void onPlayerLeft(Player player) { - if (eventListener != null) { - eventListener.onPlayerLeft(player); - } - } - - public void onNukeDetect(Position target) { - if (eventListener != null) { - eventListener.onNukeDetect(target); - } - } - - public void onUnitDiscover(Unit unit) { - if (eventListener != null) { - eventListener.onUnitDiscover(unit); - } - } - - public void onUnitEvade(Unit unit) { - if (eventListener != null) { - eventListener.onUnitEvade(unit); - } - } - - public void onUnitShow(Unit unit) { - if (eventListener != null) { - eventListener.onUnitShow(unit); - } - } - - public void onUnitHide(Unit unit) { - if (eventListener != null) { - eventListener.onUnitHide(unit); - } - } - - public void onUnitCreate(Unit unit) { - if (eventListener != null) { - eventListener.onUnitCreate(unit); - } - } - - public void onUnitDestroy(Unit unit) { - if (eventListener != null) { - eventListener.onUnitDestroy(unit); - } - } - - public void onUnitMorph(Unit unit) { - if (eventListener != null) { - eventListener.onUnitMorph(unit); - } - } - - public void onUnitRenegade(Unit unit) { - if (eventListener != null) { - eventListener.onUnitRenegade(unit); - } - } - - public void onSaveGame(String gameName) { - if (eventListener != null) { - eventListener.onSaveGame(gameName); - } - } - - public void onUnitComplete(Unit unit) { - if (eventListener != null) { - eventListener.onUnitComplete(unit); - } - } - - public void onPlayerDropped(Player player) { - if (eventListener != null) { - eventListener.onPlayerDropped(player); - } - } - -} diff --git a/bwapi4/AbstractPoint.java b/bwapi4/AbstractPoint.java deleted file mode 100644 index 29af5b8..0000000 --- a/bwapi4/AbstractPoint.java +++ /dev/null @@ -1,30 +0,0 @@ -package bwapi4; - -/** - * Common ancestor for location based objects to simplify distance computation. - * This will be refactored into interface with default methods when java 8 becomes widely used. - * - * Idea by Rafa³ Poniatowski - */ -public abstract class AbstractPoint { - - public abstract T getPoint(); - - public int getX(){ - return getPoint().getX(); - } - - public int getY(){ - return getPoint().getY(); - } - - public double distanceTo(AbstractPoint otherPosition) { - return distanceTo(otherPosition.getX(), otherPosition.getY()); - } - - public double distanceTo(int x, int y) { - double dx = x - getX(); - double dy = y - getY(); - return Math.sqrt(dx * dx + dy * dy); - } -} \ No newline at end of file diff --git a/bwapi4/BWEventListener.java b/bwapi4/BWEventListener.java deleted file mode 100644 index 6f9f031..0000000 --- a/bwapi4/BWEventListener.java +++ /dev/null @@ -1,53 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -/** - * Implement this interface and call {@link AIModule#setEventListener(bwapi.BWEventListener)} to receive all of the in game events. - */ -public interface BWEventListener { - - public void onStart(); - - public void onEnd(boolean isWinner); - - public void onFrame(); - - public void onSendText(String text); - - public void onReceiveText(Player player, String text); - - public void onPlayerLeft(Player player); - - public void onNukeDetect(Position target); - - public void onUnitDiscover(Unit unit); - - public void onUnitEvade(Unit unit); - - public void onUnitShow(Unit unit); - - public void onUnitHide(Unit unit); - - public void onUnitCreate(Unit unit); - - public void onUnitDestroy(Unit unit); - - public void onUnitMorph(Unit unit); - - public void onUnitRenegade(Unit unit); - - public void onSaveGame(String gameName); - - public void onUnitComplete(Unit unit); - - public void onPlayerDropped(Player player); - -} - - diff --git a/bwapi4/BestFilter.java b/bwapi4/BestFilter.java deleted file mode 100644 index 76c858f..0000000 --- a/bwapi4/BestFilter.java +++ /dev/null @@ -1,34 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class BestFilter { - - - private static Map instances = new HashMap(); - - private BestFilter(long pointer) { - this.pointer = pointer; - } - - private static BestFilter get(long pointer) { - if (pointer == 0 ) { - return null; - } - BestFilter instance = instances.get(pointer); - if (instance == null ) { - instance = new BestFilter(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - -} diff --git a/bwapi4/BestUnitFilter.java b/bwapi4/BestUnitFilter.java deleted file mode 100644 index 4a90ead..0000000 --- a/bwapi4/BestUnitFilter.java +++ /dev/null @@ -1,31 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class BestUnitFilter { - - - private static Map instances = new HashMap(); - - private BestUnitFilter(long pointer) { - this.pointer = pointer; - } - - private static BestUnitFilter get(long pointer) { - BestUnitFilter instance = instances.get(pointer); - if (instance == null ) { - instance = new BestUnitFilter(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - -} diff --git a/bwapi4/Bullet.java b/bwapi4/Bullet.java deleted file mode 100644 index 36f2d48..0000000 --- a/bwapi4/Bullet.java +++ /dev/null @@ -1,118 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Bullet { - - public int getID() { - return getID_native(pointer); - } - - public boolean exists() { - return exists_native(pointer); - } - - public Player getPlayer() { - return getPlayer_native(pointer); - } - - public BulletType getType() { - return getType_native(pointer); - } - - public Unit getSource() { - return getSource_native(pointer); - } - - public Position getPosition() { - return getPosition_native(pointer); - } - - public double getAngle() { - return getAngle_native(pointer); - } - - public double getVelocityX() { - return getVelocityX_native(pointer); - } - - public double getVelocityY() { - return getVelocityY_native(pointer); - } - - public Unit getTarget() { - return getTarget_native(pointer); - } - - public Position getTargetPosition() { - return getTargetPosition_native(pointer); - } - - public int getRemoveTimer() { - return getRemoveTimer_native(pointer); - } - - public boolean isVisible() { - return isVisible_native(pointer); - } - - public boolean isVisible(Player player) { - return isVisible_native(pointer, player); - } - - - private static Map instances = new HashMap(); - - private Bullet(long pointer) { - this.pointer = pointer; - } - - private static Bullet get(long pointer) { - if (pointer == 0 ) { - return null; - } - Bullet instance = instances.get(pointer); - if (instance == null ) { - instance = new Bullet(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native int getID_native(long pointer); - - private native boolean exists_native(long pointer); - - private native Player getPlayer_native(long pointer); - - private native BulletType getType_native(long pointer); - - private native Unit getSource_native(long pointer); - - private native Position getPosition_native(long pointer); - - private native double getAngle_native(long pointer); - - private native double getVelocityX_native(long pointer); - - private native double getVelocityY_native(long pointer); - - private native Unit getTarget_native(long pointer); - - private native Position getTargetPosition_native(long pointer); - - private native int getRemoveTimer_native(long pointer); - - private native boolean isVisible_native(long pointer); - - private native boolean isVisible_native(long pointer, Player player); - - -} diff --git a/bwapi4/BulletType.java b/bwapi4/BulletType.java deleted file mode 100644 index 0dc217d..0000000 --- a/bwapi4/BulletType.java +++ /dev/null @@ -1,114 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class BulletType { - - public String toString() { - return toString_native(pointer); - } - - public static BulletType Melee; - - public static BulletType Fusion_Cutter_Hit; - - public static BulletType Gauss_Rifle_Hit; - - public static BulletType C_10_Canister_Rifle_Hit; - - public static BulletType Gemini_Missiles; - - public static BulletType Fragmentation_Grenade; - - public static BulletType Longbolt_Missile; - - public static BulletType ATS_ATA_Laser_Battery; - - public static BulletType Burst_Lasers; - - public static BulletType Arclite_Shock_Cannon_Hit; - - public static BulletType EMP_Missile; - - public static BulletType Dual_Photon_Blasters_Hit; - - public static BulletType Particle_Beam_Hit; - - public static BulletType Anti_Matter_Missile; - - public static BulletType Pulse_Cannon; - - public static BulletType Psionic_Shockwave_Hit; - - public static BulletType Psionic_Storm; - - public static BulletType Yamato_Gun; - - public static BulletType Phase_Disruptor; - - public static BulletType STA_STS_Cannon_Overlay; - - public static BulletType Sunken_Colony_Tentacle; - - public static BulletType Acid_Spore; - - public static BulletType Glave_Wurm; - - public static BulletType Seeker_Spores; - - public static BulletType Queen_Spell_Carrier; - - public static BulletType Plague_Cloud; - - public static BulletType Consume; - - public static BulletType Ensnare; - - public static BulletType Needle_Spine_Hit; - - public static BulletType Invisible; - - public static BulletType Optical_Flare_Grenade; - - public static BulletType Halo_Rockets; - - public static BulletType Subterranean_Spines; - - public static BulletType Corrosive_Acid_Shot; - - public static BulletType Neutron_Flare; - - public static BulletType None; - - public static BulletType Unknown; - - - private static Map instances = new HashMap(); - - private BulletType(long pointer) { - this.pointer = pointer; - } - - private static BulletType get(long pointer) { - if (pointer == 0 ) { - return null; - } - BulletType instance = instances.get(pointer); - if (instance == null ) { - instance = new BulletType(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String toString_native(long pointer); - - -} diff --git a/bwapi4/Bulletset.java b/bwapi4/Bulletset.java deleted file mode 100644 index 7921ecd..0000000 --- a/bwapi4/Bulletset.java +++ /dev/null @@ -1,34 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Bulletset { - - - private static Map instances = new HashMap(); - - private Bulletset(long pointer) { - this.pointer = pointer; - } - - private static Bulletset get(long pointer) { - if (pointer == 0 ) { - return null; - } - Bulletset instance = instances.get(pointer); - if (instance == null ) { - instance = new Bulletset(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - -} diff --git a/bwapi4/CenteredObject.java b/bwapi4/CenteredObject.java deleted file mode 100644 index 2a200ac..0000000 --- a/bwapi4/CenteredObject.java +++ /dev/null @@ -1,15 +0,0 @@ -package bwapi4; - -import bwapi4.Position; - -/** - * Interrmediate class used to translate getPoint() calls to getCenter() calls. - */ -public abstract class CenteredObject extends AbstractPoint { - - public Position getPoint(){ - return getCenter(); - } - - public abstract Position getCenter(); -} \ No newline at end of file diff --git a/bwapi4/Client.java b/bwapi4/Client.java deleted file mode 100644 index 6ea52ec..0000000 --- a/bwapi4/Client.java +++ /dev/null @@ -1,58 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Client { - - public boolean isConnected() { - return isConnected_native(pointer); - } - - public boolean connect() { - return connect_native(pointer); - } - - public void disconnect() { - disconnect_native(pointer); - } - - public void update() { - update_native(pointer); - } - - - private static Map instances = new HashMap(); - - private Client(long pointer) { - this.pointer = pointer; - } - - private static Client get(long pointer) { - if (pointer == 0 ) { - return null; - } - Client instance = instances.get(pointer); - if (instance == null ) { - instance = new Client(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native boolean isConnected_native(long pointer); - - private native boolean connect_native(long pointer); - - private native void disconnect_native(long pointer); - - private native void update_native(long pointer); - - -} diff --git a/bwapi4/Color.java b/bwapi4/Color.java deleted file mode 100644 index e15c22a..0000000 --- a/bwapi4/Color.java +++ /dev/null @@ -1,73 +0,0 @@ -package bwapi4; - -import java.lang.Override; -import java.util.HashMap; -import java.util.Map; - -/** - * Starcraft uses a 256 color palette to render everything, - * so the colors available for draw shapes using BWAPI is limited to the colors available in the Pallete. - * Several predefined colors from the pallete are provided. - */ -public class Color { - - private int r, g, b; - - /** - * Create a color using the color in the palette that is closest to the RGB color specified. This will check a number of colors in the pallet to see which is closest to the specified color so this function is relatively slow. - * @param r - * @param g - * @param b - */ - public Color(int r, int g, int b) { - this.r = r; - this.g = g; - this.b = b; - } - - public static Color Red; - - public static Color Blue; - - public static Color Teal; - - public static Color Purple; - - public static Color Orange; - - public static Color Brown; - - public static Color White; - - public static Color Yellow; - - public static Color Green; - - public static Color Cyan; - - public static Color Black; - - public static Color Grey; - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof Color)) return false; - - Color color = (Color) o; - - if (b != color.b) return false; - if (g != color.g) return false; - if (r != color.r) return false; - - return true; - } - - @Override - public int hashCode() { - int result = r; - result = 31 * result + g; - result = 31 * result + b; - return result; - } -} diff --git a/bwapi4/CommandType/Enum.java b/bwapi4/CommandType/Enum.java deleted file mode 100644 index b379559..0000000 --- a/bwapi4/CommandType/Enum.java +++ /dev/null @@ -1,41 +0,0 @@ -package bwapi4.CommandType; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public enum Enum { - - None(0), - SetScreenPosition(1), - PingMinimap(2), - EnableFlag(3), - Printf(4), - SendText(5), - PauseGame(6), - ResumeGame(7), - LeaveGame(8), - RestartGame(9), - SetLocalSpeed(10), - SetLatCom(11), - SetGui(12), - SetFrameSkip(13), - SetMap(14), - SetAllies(15), - SetVision(16), - SetCommandOptimizerLevel(17); - - private int value; - - public int getValue(){ - return value; - } - - Enum(int value){ - this.value = value; - } - -} diff --git a/bwapi4/CompareFilter.java b/bwapi4/CompareFilter.java deleted file mode 100644 index c4fa5a6..0000000 --- a/bwapi4/CompareFilter.java +++ /dev/null @@ -1,34 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class CompareFilter { - - - private static Map instances = new HashMap(); - - private CompareFilter(long pointer) { - this.pointer = pointer; - } - - private static CompareFilter get(long pointer) { - if (pointer == 0 ) { - return null; - } - CompareFilter instance = instances.get(pointer); - if (instance == null ) { - instance = new CompareFilter(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - -} diff --git a/bwapi4/CoordinateType/Enum.java b/bwapi4/CoordinateType/Enum.java deleted file mode 100644 index 4c5bce5..0000000 --- a/bwapi4/CoordinateType/Enum.java +++ /dev/null @@ -1,27 +0,0 @@ -package bwapi4.CoordinateType; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public enum Enum { - - None(0), - Screen(1), - Map(2), - Mouse(3); - - private int value; - - public int getValue(){ - return value; - } - - Enum(int value){ - this.value = value; - } - -} diff --git a/bwapi4/DamageType.java b/bwapi4/DamageType.java deleted file mode 100644 index 135d2ea..0000000 --- a/bwapi4/DamageType.java +++ /dev/null @@ -1,54 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class DamageType { - - public String toString() { - return toString_native(pointer); - } - - public static DamageType Independent; - - public static DamageType Explosive; - - public static DamageType Concussive; - - public static DamageType Normal; - - public static DamageType Ignore_Armor; - - public static DamageType None; - - public static DamageType Unknown; - - - private static Map instances = new HashMap(); - - private DamageType(long pointer) { - this.pointer = pointer; - } - - private static DamageType get(long pointer) { - if (pointer == 0 ) { - return null; - } - DamageType instance = instances.get(pointer); - if (instance == null ) { - instance = new DamageType(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String toString_native(long pointer); - - -} diff --git a/bwapi4/DefaultBWListener.java b/bwapi4/DefaultBWListener.java deleted file mode 100644 index 76df50e..0000000 --- a/bwapi4/DefaultBWListener.java +++ /dev/null @@ -1,103 +0,0 @@ -package bwapi4; - -import bwapi4.BWEventListener; -import bwapi4.Player; -import bwapi4.Position; -import bwapi4.Unit; - -/** - * A utility stub class providing a default implementation of {@link BWEventListener}, - * override it's methods if you want to handle only some events. - */ -public class DefaultBWListener implements BWEventListener { - - @Override - public void onStart() { - - } - - @Override - public void onEnd(boolean b) { - - } - - @Override - public void onFrame() { - - } - - @Override - public void onSendText(String s) { - - } - - @Override - public void onReceiveText(Player player, String s) { - - } - - @Override - public void onPlayerLeft(Player player) { - - } - - @Override - public void onNukeDetect(Position position) { - - } - - @Override - public void onUnitDiscover(Unit unit) { - - } - - @Override - public void onUnitEvade(Unit unit) { - - } - - @Override - public void onUnitShow(Unit unit) { - - } - - @Override - public void onUnitHide(Unit unit) { - - } - - @Override - public void onUnitCreate(Unit unit) { - - } - - @Override - public void onUnitDestroy(Unit unit) { - - } - - @Override - public void onUnitMorph(Unit unit) { - - } - - @Override - public void onUnitRenegade(Unit unit) { - - } - - @Override - public void onSaveGame(String s) { - - } - - @Override - public void onUnitComplete(Unit unit) { - - } - - @Override - public void onPlayerDropped(Player player) { - - } -} diff --git a/bwapi4/Enum/Enum.java b/bwapi4/Enum/Enum.java deleted file mode 100644 index a655dc1..0000000 --- a/bwapi4/Enum/Enum.java +++ /dev/null @@ -1,126 +0,0 @@ -package bwapi4.Enum; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public enum Enum { - - Gauss_Rifle(0), - Gauss_Rifle_Jim_Raynor(1), - C_10_Canister_Rifle(2), - C_10_Canister_Rifle_Sarah_Kerrigan(3), - Fragmentation_Grenade(4), - Fragmentation_Grenade_Jim_Raynor(5), - Spider_Mines(6), - Twin_Autocannons(7), - Hellfire_Missile_Pack(8), - Twin_Autocannons_Alan_Schezar(9), - Hellfire_Missile_Pack_Alan_Schezar(10), - Arclite_Cannon(11), - Arclite_Cannon_Edmund_Duke(12), - Fusion_Cutter(13), - Gemini_Missiles(15), - Burst_Lasers(16), - Gemini_Missiles_Tom_Kazansky(17), - Burst_Lasers_Tom_Kazansky(18), - ATS_Laser_Battery(19), - ATA_Laser_Battery(20), - ATS_Laser_Battery_Hero(21), - ATA_Laser_Battery_Hero(22), - ATS_Laser_Battery_Hyperion(23), - ATA_Laser_Battery_Hyperion(24), - Flame_Thrower(25), - Flame_Thrower_Gui_Montag(26), - Arclite_Shock_Cannon(27), - Arclite_Shock_Cannon_Edmund_Duke(28), - Longbolt_Missile(29), - Yamato_Gun(30), - Nuclear_Strike(31), - Lockdown(32), - EMP_Shockwave(33), - Irradiate(34), - Claws(35), - Claws_Devouring_One(36), - Claws_Infested_Kerrigan(37), - Needle_Spines(38), - Needle_Spines_Hunter_Killer(39), - Kaiser_Blades(40), - Kaiser_Blades_Torrasque(41), - Toxic_Spores(42), - Spines(43), - Acid_Spore(46), - Acid_Spore_Kukulza(47), - Glave_Wurm(48), - Glave_Wurm_Kukulza(49), - Seeker_Spores(52), - Subterranean_Tentacle(53), - Suicide_Infested_Terran(54), - Suicide_Scourge(55), - Parasite(56), - Spawn_Broodlings(57), - Ensnare(58), - Dark_Swarm(59), - Plague(60), - Consume(61), - Particle_Beam(62), - Psi_Blades(64), - Psi_Blades_Fenix(65), - Phase_Disruptor(66), - Phase_Disruptor_Fenix(67), - Psi_Assault(69), - Psionic_Shockwave(70), - Psionic_Shockwave_TZ_Archon(71), - Dual_Photon_Blasters(73), - Anti_Matter_Missiles(74), - Dual_Photon_Blasters_Mojo(75), - Anti_Matter_Missiles_Mojo(76), - Phase_Disruptor_Cannon(77), - Phase_Disruptor_Cannon_Danimoth(78), - Pulse_Cannon(79), - STS_Photon_Cannon(80), - STA_Photon_Cannon(81), - Scarab(82), - Stasis_Field(83), - Psionic_Storm(84), - Warp_Blades_Zeratul(85), - Warp_Blades_Hero(86), - Platform_Laser_Battery(92), - Independant_Laser_Battery(93), - Twin_Autocannons_Floor_Trap(96), - Hellfire_Missile_Pack_Wall_Trap(97), - Flame_Thrower_Wall_Trap(98), - Hellfire_Missile_Pack_Floor_Trap(99), - Neutron_Flare(100), - Disruption_Web(101), - Restoration(102), - Halo_Rockets(103), - Corrosive_Acid(104), - Mind_Control(105), - Feedback(106), - Optical_Flare(107), - Maelstrom(108), - Subterranean_Spines(109), - Warp_Blades(111), - C_10_Canister_Rifle_Samir_Duran(112), - C_10_Canister_Rifle_Infested_Duran(113), - Dual_Photon_Blasters_Artanis(114), - Anti_Matter_Missiles_Artanis(115), - C_10_Canister_Rifle_Alexei_Stukov(116), - None(130), - Unknown(131); - - private int value; - - public int getValue(){ - return value; - } - - Enum(int value){ - this.value = value; - } - -} diff --git a/bwapi4/Error.java b/bwapi4/Error.java deleted file mode 100644 index 29412a9..0000000 --- a/bwapi4/Error.java +++ /dev/null @@ -1,96 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Error { - - public String toString() { - return toString_native(pointer); - } - - public static Error Unit_Does_Not_Exist; - - public static Error Unit_Not_Visible; - - public static Error Unit_Not_Owned; - - public static Error Unit_Busy; - - public static Error Incompatible_UnitType; - - public static Error Incompatible_TechType; - - public static Error Incompatible_State; - - public static Error Already_Researched; - - public static Error Fully_Upgraded; - - public static Error Currently_Researching; - - public static Error Currently_Upgrading; - - public static Error Insufficient_Minerals; - - public static Error Insufficient_Gas; - - public static Error Insufficient_Supply; - - public static Error Insufficient_Energy; - - public static Error Insufficient_Tech; - - public static Error Insufficient_Ammo; - - public static Error Insufficient_Space; - - public static Error Invalid_Tile_Position; - - public static Error Unbuildable_Location; - - public static Error Unreachable_Location; - - public static Error Out_Of_Range; - - public static Error Unable_To_Hit; - - public static Error Access_Denied; - - public static Error File_Not_Found; - - public static Error Invalid_Parameter; - - public static Error None; - - public static Error Unknown; - - - private static Map instances = new HashMap(); - - private Error(long pointer) { - this.pointer = pointer; - } - - private static Error get(long pointer) { - if (pointer == 0 ) { - return null; - } - Error instance = instances.get(pointer); - if (instance == null ) { - instance = new Error(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String toString_native(long pointer); - - -} diff --git a/bwapi4/Event.java b/bwapi4/Event.java deleted file mode 100644 index 362ca82..0000000 --- a/bwapi4/Event.java +++ /dev/null @@ -1,64 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Event { - - public Position getPosition() { - return getPosition_native(pointer); - } - - public String getText() { - return getText_native(pointer); - } - - public Unit getUnit() { - return getUnit_native(pointer); - } - - public Player getPlayer() { - return getPlayer_native(pointer); - } - - public boolean isWinner() { - return isWinner_native(pointer); - } - - - private static Map instances = new HashMap(); - - private Event(long pointer) { - this.pointer = pointer; - } - - private static Event get(long pointer) { - if (pointer == 0 ) { - return null; - } - Event instance = instances.get(pointer); - if (instance == null ) { - instance = new Event(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native Position getPosition_native(long pointer); - - private native String getText_native(long pointer); - - private native Unit getUnit_native(long pointer); - - private native Player getPlayer_native(long pointer); - - private native boolean isWinner_native(long pointer); - - -} diff --git a/bwapi4/EventType/Enum.java b/bwapi4/EventType/Enum.java deleted file mode 100644 index 6173e74..0000000 --- a/bwapi4/EventType/Enum.java +++ /dev/null @@ -1,41 +0,0 @@ -package bwapi4.EventType; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public enum Enum { - - MatchStart(0), - MatchEnd(1), - MatchFrame(2), - MenuFrame(3), - SendText(4), - ReceiveText(5), - PlayerLeft(6), - NukeDetect(7), - UnitDiscover(8), - UnitEvade(9), - UnitShow(10), - UnitHide(11), - UnitCreate(12), - UnitDestroy(13), - UnitMorph(14), - UnitRenegade(15), - SaveGame(16), - UnitComplete(17); - - private int value; - - public int getValue(){ - return value; - } - - Enum(int value){ - this.value = value; - } - -} diff --git a/bwapi4/ExplosionType.java b/bwapi4/ExplosionType.java deleted file mode 100644 index 7fdca74..0000000 --- a/bwapi4/ExplosionType.java +++ /dev/null @@ -1,90 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class ExplosionType { - - public String toString() { - return toString_native(pointer); - } - - public static ExplosionType None; - - public static ExplosionType Normal; - - public static ExplosionType Radial_Splash; - - public static ExplosionType Enemy_Splash; - - public static ExplosionType Lockdown; - - public static ExplosionType Nuclear_Missile; - - public static ExplosionType Parasite; - - public static ExplosionType Broodlings; - - public static ExplosionType EMP_Shockwave; - - public static ExplosionType Irradiate; - - public static ExplosionType Ensnare; - - public static ExplosionType Plague; - - public static ExplosionType Stasis_Field; - - public static ExplosionType Dark_Swarm; - - public static ExplosionType Consume; - - public static ExplosionType Yamato_Gun; - - public static ExplosionType Restoration; - - public static ExplosionType Disruption_Web; - - public static ExplosionType Corrosive_Acid; - - public static ExplosionType Mind_Control; - - public static ExplosionType Feedback; - - public static ExplosionType Optical_Flare; - - public static ExplosionType Maelstrom; - - public static ExplosionType Air_Splash; - - public static ExplosionType Unknown; - - - private static Map instances = new HashMap(); - - private ExplosionType(long pointer) { - this.pointer = pointer; - } - - private static ExplosionType get(long pointer) { - if (pointer == 0 ) { - return null; - } - ExplosionType instance = instances.get(pointer); - if (instance == null ) { - instance = new ExplosionType(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String toString_native(long pointer); - - -} diff --git a/bwapi4/Flag/Enum.java b/bwapi4/Flag/Enum.java deleted file mode 100644 index cdbf3d4..0000000 --- a/bwapi4/Flag/Enum.java +++ /dev/null @@ -1,25 +0,0 @@ -package bwapi4.Flag; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public enum Enum { - - CompleteMapInformation(0), - UserInput(1); - - private int value; - - public int getValue(){ - return value; - } - - Enum(int value){ - this.value = value; - } - -} diff --git a/bwapi4/Force.java b/bwapi4/Force.java deleted file mode 100644 index 0a46073..0000000 --- a/bwapi4/Force.java +++ /dev/null @@ -1,52 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Force { - - public int getID() { - return getID_native(pointer); - } - - public String getName() { - return getName_native(pointer); - } - - public List getPlayers() { - return getPlayers_native(pointer); - } - - - private static Map instances = new HashMap(); - - private Force(long pointer) { - this.pointer = pointer; - } - - private static Force get(long pointer) { - if (pointer == 0 ) { - return null; - } - Force instance = instances.get(pointer); - if (instance == null ) { - instance = new Force(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native int getID_native(long pointer); - - private native String getName_native(long pointer); - - private native List getPlayers_native(long pointer); - - -} diff --git a/bwapi4/Forceset.java b/bwapi4/Forceset.java deleted file mode 100644 index cb4b362..0000000 --- a/bwapi4/Forceset.java +++ /dev/null @@ -1,40 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Forceset { - - public List getPlayers() { - return getPlayers_native(pointer); - } - - - private static Map instances = new HashMap(); - - private Forceset(long pointer) { - this.pointer = pointer; - } - - private static Forceset get(long pointer) { - if (pointer == 0 ) { - return null; - } - Forceset instance = instances.get(pointer); - if (instance == null ) { - instance = new Forceset(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native List getPlayers_native(long pointer); - - -} diff --git a/bwapi4/Game.java b/bwapi4/Game.java deleted file mode 100644 index 196543b..0000000 --- a/bwapi4/Game.java +++ /dev/null @@ -1,1330 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Game { - - public List getForces() { - return getForces_native(pointer); - } - - public List getPlayers() { - return getPlayers_native(pointer); - } - - public List getAllUnits() { - return getAllUnits_native(pointer); - } - - public List getMinerals() { - return getMinerals_native(pointer); - } - - public List getGeysers() { - return getGeysers_native(pointer); - } - - public List getNeutralUnits() { - return getNeutralUnits_native(pointer); - } - - public List getStaticMinerals() { - return getStaticMinerals_native(pointer); - } - - public List getStaticGeysers() { - return getStaticGeysers_native(pointer); - } - - public List getStaticNeutralUnits() { - return getStaticNeutralUnits_native(pointer); - } - - public List getBullets() { - return getBullets_native(pointer); - } - - public Force getForce(int forceID) { - return getForce_native(pointer, forceID); - } - - public Player getPlayer(int playerID) { - return getPlayer_native(pointer, playerID); - } - - public Unit getUnit(int unitID) { - return getUnit_native(pointer, unitID); - } - - public Unit indexToUnit(int unitIndex) { - return indexToUnit_native(pointer, unitIndex); - } - - public Region getRegion(int regionID) { - return getRegion_native(pointer, regionID); - } - - public GameType getGameType() { - return getGameType_native(pointer); - } - - public int getLatency() { - return getLatency_native(pointer); - } - - public int getFrameCount() { - return getFrameCount_native(pointer); - } - - public int getReplayFrameCount() { - return getReplayFrameCount_native(pointer); - } - - public int getFPS() { - return getFPS_native(pointer); - } - - public double getAverageFPS() { - return getAverageFPS_native(pointer); - } - - public Position getMousePosition() { - return getMousePosition_native(pointer); - } - - public boolean getMouseState(MouseButton button) { - return getMouseState_native(pointer, button); - } - - public boolean getKeyState(Key key) { - return getKeyState_native(pointer, key); - } - - public Position getScreenPosition() { - return getScreenPosition_native(pointer); - } - - public void setScreenPosition(int x, int y) { - setScreenPosition_native(pointer, x, y); - } - - public void setScreenPosition(Position p) { - setScreenPosition_native(pointer, p); - } - - public void pingMinimap(int x, int y) { - pingMinimap_native(pointer, x, y); - } - - public void pingMinimap(Position p) { - pingMinimap_native(pointer, p); - } - - public boolean isFlagEnabled(int flag) { - return isFlagEnabled_native(pointer, flag); - } - - public void enableFlag(int flag) { - enableFlag_native(pointer, flag); - } - - public Error getLastError() { - return getLastError_native(pointer); - } - - public boolean setLastError() { - return setLastError_native(pointer); - } - - public boolean setLastError(Error e) { - return setLastError_native(pointer, e); - } - - public int mapWidth() { - return mapWidth_native(pointer); - } - - public int mapHeight() { - return mapHeight_native(pointer); - } - - public String mapFileName() { - return mapFileName_native(pointer); - } - - public String mapPathName() { - return mapPathName_native(pointer); - } - - public String mapName() { - return mapName_native(pointer); - } - - public String mapHash() { - return mapHash_native(pointer); - } - - public boolean isWalkable(int walkX, int walkY) { - return isWalkable_native(pointer, walkX, walkY); - } - - public boolean isWalkable(WalkPosition position) { - return isWalkable_native(pointer, position); - } - - public int getGroundHeight(int tileX, int tileY) { - return getGroundHeight_native(pointer, tileX, tileY); - } - - public int getGroundHeight(TilePosition position) { - return getGroundHeight_native(pointer, position); - } - - public boolean isBuildable(int tileX, int tileY) { - return isBuildable_native(pointer, tileX, tileY); - } - - public boolean isBuildable(int tileX, int tileY, boolean includeBuildings) { - return isBuildable_native(pointer, tileX, tileY, includeBuildings); - } - - public boolean isBuildable(TilePosition position) { - return isBuildable_native(pointer, position); - } - - public boolean isBuildable(TilePosition position, boolean includeBuildings) { - return isBuildable_native(pointer, position, includeBuildings); - } - - public boolean isVisible(int tileX, int tileY) { - return isVisible_native(pointer, tileX, tileY); - } - - public boolean isVisible(TilePosition position) { - return isVisible_native(pointer, position); - } - - public boolean isExplored(int tileX, int tileY) { - return isExplored_native(pointer, tileX, tileY); - } - - public boolean isExplored(TilePosition position) { - return isExplored_native(pointer, position); - } - - public boolean hasCreep(int tileX, int tileY) { - return hasCreep_native(pointer, tileX, tileY); - } - - public boolean hasCreep(TilePosition position) { - return hasCreep_native(pointer, position); - } - - public boolean hasPowerPrecise(int x, int y) { - return hasPowerPrecise_native(pointer, x, y); - } - - public boolean hasPowerPrecise(int x, int y, UnitType unitType) { - return hasPowerPrecise_native(pointer, x, y, unitType); - } - - public boolean hasPowerPrecise(Position position) { - return hasPowerPrecise_native(pointer, position); - } - - public boolean hasPowerPrecise(Position position, UnitType unitType) { - return hasPowerPrecise_native(pointer, position, unitType); - } - - public boolean hasPower(int tileX, int tileY) { - return hasPower_native(pointer, tileX, tileY); - } - - public boolean hasPower(int tileX, int tileY, UnitType unitType) { - return hasPower_native(pointer, tileX, tileY, unitType); - } - - public boolean hasPower(TilePosition position) { - return hasPower_native(pointer, position); - } - - public boolean hasPower(TilePosition position, UnitType unitType) { - return hasPower_native(pointer, position, unitType); - } - - public boolean hasPower(int tileX, int tileY, int tileWidth, int tileHeight) { - return hasPower_native(pointer, tileX, tileY, tileWidth, tileHeight); - } - - public boolean hasPower(int tileX, int tileY, int tileWidth, int tileHeight, UnitType unitType) { - return hasPower_native(pointer, tileX, tileY, tileWidth, tileHeight, unitType); - } - - public boolean hasPower(TilePosition position, int tileWidth, int tileHeight) { - return hasPower_native(pointer, position, tileWidth, tileHeight); - } - - public boolean hasPower(TilePosition position, int tileWidth, int tileHeight, UnitType unitType) { - return hasPower_native(pointer, position, tileWidth, tileHeight, unitType); - } - - public boolean canBuildHere(TilePosition position, UnitType type, Unit builder) { - return canBuildHere_native(pointer, position, type, builder); - } - - public boolean canBuildHere(TilePosition position, UnitType type) { - return canBuildHere_native(pointer, position, type); - } - - public boolean canBuildHere(TilePosition position, UnitType type, Unit builder, boolean checkExplored) { - return canBuildHere_native(pointer, position, type, builder, checkExplored); - } - - public boolean canMake(UnitType type) { - return canMake_native(pointer, type); - } - - public boolean canMake(UnitType type, Unit builder) { - return canMake_native(pointer, type, builder); - } - - public boolean canResearch(TechType type, Unit unit) { - return canResearch_native(pointer, type, unit); - } - - public boolean canResearch(TechType type) { - return canResearch_native(pointer, type); - } - - public boolean canResearch(TechType type, Unit unit, boolean checkCanIssueCommandType) { - return canResearch_native(pointer, type, unit, checkCanIssueCommandType); - } - - public boolean canUpgrade(UpgradeType type, Unit unit) { - return canUpgrade_native(pointer, type, unit); - } - - public boolean canUpgrade(UpgradeType type) { - return canUpgrade_native(pointer, type); - } - - public boolean canUpgrade(UpgradeType type, Unit unit, boolean checkCanIssueCommandType) { - return canUpgrade_native(pointer, type, unit, checkCanIssueCommandType); - } - - public void printf(String cstr_format) { - printf_native(pointer, cstr_format); - } - - public void sendText(String cstr_format) { - sendText_native(pointer, cstr_format); - } - - public void sendTextEx(boolean toAllies, String cstr_format) { - sendTextEx_native(pointer, toAllies, cstr_format); - } - - public boolean isInGame() { - return isInGame_native(pointer); - } - - public boolean isMultiplayer() { - return isMultiplayer_native(pointer); - } - - public boolean isBattleNet() { - return isBattleNet_native(pointer); - } - - public boolean isPaused() { - return isPaused_native(pointer); - } - - public boolean isReplay() { - return isReplay_native(pointer); - } - - public void pauseGame() { - pauseGame_native(pointer); - } - - public void resumeGame() { - resumeGame_native(pointer); - } - - public void leaveGame() { - leaveGame_native(pointer); - } - - public void restartGame() { - restartGame_native(pointer); - } - - public void setLocalSpeed(int speed) { - setLocalSpeed_native(pointer, speed); - } - - public boolean issueCommand(List units, UnitCommand command) { - return issueCommand_native(pointer, units, command); - } - - public List getSelectedUnits() { - return getSelectedUnits_native(pointer); - } - - public Player self() { - return self_native(pointer); - } - - public Player enemy() { - return enemy_native(pointer); - } - - public Player neutral() { - return neutral_native(pointer); - } - - public List allies() { - return allies_native(pointer); - } - - public List enemies() { - return enemies_native(pointer); - } - - public List observers() { - return observers_native(pointer); - } - - public void setTextSize() { - setTextSize_native(pointer); - } - - public void setTextSize(bwapi4.Text.Size.Enum size) { - setTextSize_native(pointer, size); - } - - public void drawText(bwapi4.CoordinateType.Enum ctype, int x, int y, String cstr_format) { - drawText_native(pointer, ctype, x, y, cstr_format); - } - - public void drawTextMap(int x, int y, String cstr_format) { - drawTextMap_native(pointer, x, y, cstr_format); - } - - public void drawTextMap(Position p, String cstr_format) { - drawTextMap_native(pointer, p, cstr_format); - } - - public void drawTextMouse(int x, int y, String cstr_format) { - drawTextMouse_native(pointer, x, y, cstr_format); - } - - public void drawTextMouse(Position p, String cstr_format) { - drawTextMouse_native(pointer, p, cstr_format); - } - - public void drawTextScreen(int x, int y, String cstr_format) { - drawTextScreen_native(pointer, x, y, cstr_format); - } - - public void drawTextScreen(Position p, String cstr_format) { - drawTextScreen_native(pointer, p, cstr_format); - } - - public void drawBox(bwapi4.CoordinateType.Enum ctype, int left, int top, int right, int bottom, Color color) { - drawBox_native(pointer, ctype, left, top, right, bottom, color); - } - - public void drawBox(bwapi4.CoordinateType.Enum ctype, int left, int top, int right, int bottom, Color color, boolean isSolid) { - drawBox_native(pointer, ctype, left, top, right, bottom, color, isSolid); - } - - public void drawBoxMap(int left, int top, int right, int bottom, Color color) { - drawBoxMap_native(pointer, left, top, right, bottom, color); - } - - public void drawBoxMap(int left, int top, int right, int bottom, Color color, boolean isSolid) { - drawBoxMap_native(pointer, left, top, right, bottom, color, isSolid); - } - - public void drawBoxMap(Position leftTop, Position rightBottom, Color color) { - drawBoxMap_native(pointer, leftTop, rightBottom, color); - } - - public void drawBoxMap(Position leftTop, Position rightBottom, Color color, boolean isSolid) { - drawBoxMap_native(pointer, leftTop, rightBottom, color, isSolid); - } - - public void drawBoxMouse(int left, int top, int right, int bottom, Color color) { - drawBoxMouse_native(pointer, left, top, right, bottom, color); - } - - public void drawBoxMouse(int left, int top, int right, int bottom, Color color, boolean isSolid) { - drawBoxMouse_native(pointer, left, top, right, bottom, color, isSolid); - } - - public void drawBoxMouse(Position leftTop, Position rightBottom, Color color) { - drawBoxMouse_native(pointer, leftTop, rightBottom, color); - } - - public void drawBoxMouse(Position leftTop, Position rightBottom, Color color, boolean isSolid) { - drawBoxMouse_native(pointer, leftTop, rightBottom, color, isSolid); - } - - public void drawBoxScreen(int left, int top, int right, int bottom, Color color) { - drawBoxScreen_native(pointer, left, top, right, bottom, color); - } - - public void drawBoxScreen(int left, int top, int right, int bottom, Color color, boolean isSolid) { - drawBoxScreen_native(pointer, left, top, right, bottom, color, isSolid); - } - - public void drawBoxScreen(Position leftTop, Position rightBottom, Color color) { - drawBoxScreen_native(pointer, leftTop, rightBottom, color); - } - - public void drawBoxScreen(Position leftTop, Position rightBottom, Color color, boolean isSolid) { - drawBoxScreen_native(pointer, leftTop, rightBottom, color, isSolid); - } - - public void drawTriangle(bwapi4.CoordinateType.Enum ctype, int ax, int ay, int bx, int by, int cx, int cy, Color color) { - drawTriangle_native(pointer, ctype, ax, ay, bx, by, cx, cy, color); - } - - public void drawTriangle(bwapi4.CoordinateType.Enum ctype, int ax, int ay, int bx, int by, int cx, int cy, Color color, boolean isSolid) { - drawTriangle_native(pointer, ctype, ax, ay, bx, by, cx, cy, color, isSolid); - } - - public void drawTriangleMap(int ax, int ay, int bx, int by, int cx, int cy, Color color) { - drawTriangleMap_native(pointer, ax, ay, bx, by, cx, cy, color); - } - - public void drawTriangleMap(int ax, int ay, int bx, int by, int cx, int cy, Color color, boolean isSolid) { - drawTriangleMap_native(pointer, ax, ay, bx, by, cx, cy, color, isSolid); - } - - public void drawTriangleMap(Position a, Position b, Position c, Color color) { - drawTriangleMap_native(pointer, a, b, c, color); - } - - public void drawTriangleMap(Position a, Position b, Position c, Color color, boolean isSolid) { - drawTriangleMap_native(pointer, a, b, c, color, isSolid); - } - - public void drawTriangleMouse(int ax, int ay, int bx, int by, int cx, int cy, Color color) { - drawTriangleMouse_native(pointer, ax, ay, bx, by, cx, cy, color); - } - - public void drawTriangleMouse(int ax, int ay, int bx, int by, int cx, int cy, Color color, boolean isSolid) { - drawTriangleMouse_native(pointer, ax, ay, bx, by, cx, cy, color, isSolid); - } - - public void drawTriangleMouse(Position a, Position b, Position c, Color color) { - drawTriangleMouse_native(pointer, a, b, c, color); - } - - public void drawTriangleMouse(Position a, Position b, Position c, Color color, boolean isSolid) { - drawTriangleMouse_native(pointer, a, b, c, color, isSolid); - } - - public void drawTriangleScreen(int ax, int ay, int bx, int by, int cx, int cy, Color color) { - drawTriangleScreen_native(pointer, ax, ay, bx, by, cx, cy, color); - } - - public void drawTriangleScreen(int ax, int ay, int bx, int by, int cx, int cy, Color color, boolean isSolid) { - drawTriangleScreen_native(pointer, ax, ay, bx, by, cx, cy, color, isSolid); - } - - public void drawTriangleScreen(Position a, Position b, Position c, Color color) { - drawTriangleScreen_native(pointer, a, b, c, color); - } - - public void drawTriangleScreen(Position a, Position b, Position c, Color color, boolean isSolid) { - drawTriangleScreen_native(pointer, a, b, c, color, isSolid); - } - - public void drawCircle(bwapi4.CoordinateType.Enum ctype, int x, int y, int radius, Color color) { - drawCircle_native(pointer, ctype, x, y, radius, color); - } - - public void drawCircle(bwapi4.CoordinateType.Enum ctype, int x, int y, int radius, Color color, boolean isSolid) { - drawCircle_native(pointer, ctype, x, y, radius, color, isSolid); - } - - public void drawCircleMap(int x, int y, int radius, Color color) { - drawCircleMap_native(pointer, x, y, radius, color); - } - - public void drawCircleMap(int x, int y, int radius, Color color, boolean isSolid) { - drawCircleMap_native(pointer, x, y, radius, color, isSolid); - } - - public void drawCircleMap(Position p, int radius, Color color) { - drawCircleMap_native(pointer, p, radius, color); - } - - public void drawCircleMap(Position p, int radius, Color color, boolean isSolid) { - drawCircleMap_native(pointer, p, radius, color, isSolid); - } - - public void drawCircleMouse(int x, int y, int radius, Color color) { - drawCircleMouse_native(pointer, x, y, radius, color); - } - - public void drawCircleMouse(int x, int y, int radius, Color color, boolean isSolid) { - drawCircleMouse_native(pointer, x, y, radius, color, isSolid); - } - - public void drawCircleMouse(Position p, int radius, Color color) { - drawCircleMouse_native(pointer, p, radius, color); - } - - public void drawCircleMouse(Position p, int radius, Color color, boolean isSolid) { - drawCircleMouse_native(pointer, p, radius, color, isSolid); - } - - public void drawCircleScreen(int x, int y, int radius, Color color) { - drawCircleScreen_native(pointer, x, y, radius, color); - } - - public void drawCircleScreen(int x, int y, int radius, Color color, boolean isSolid) { - drawCircleScreen_native(pointer, x, y, radius, color, isSolid); - } - - public void drawCircleScreen(Position p, int radius, Color color) { - drawCircleScreen_native(pointer, p, radius, color); - } - - public void drawCircleScreen(Position p, int radius, Color color, boolean isSolid) { - drawCircleScreen_native(pointer, p, radius, color, isSolid); - } - - public void drawEllipse(bwapi4.CoordinateType.Enum ctype, int x, int y, int xrad, int yrad, Color color) { - drawEllipse_native(pointer, ctype, x, y, xrad, yrad, color); - } - - public void drawEllipse(bwapi4.CoordinateType.Enum ctype, int x, int y, int xrad, int yrad, Color color, boolean isSolid) { - drawEllipse_native(pointer, ctype, x, y, xrad, yrad, color, isSolid); - } - - public void drawEllipseMap(int x, int y, int xrad, int yrad, Color color) { - drawEllipseMap_native(pointer, x, y, xrad, yrad, color); - } - - public void drawEllipseMap(int x, int y, int xrad, int yrad, Color color, boolean isSolid) { - drawEllipseMap_native(pointer, x, y, xrad, yrad, color, isSolid); - } - - public void drawEllipseMap(Position p, int xrad, int yrad, Color color) { - drawEllipseMap_native(pointer, p, xrad, yrad, color); - } - - public void drawEllipseMap(Position p, int xrad, int yrad, Color color, boolean isSolid) { - drawEllipseMap_native(pointer, p, xrad, yrad, color, isSolid); - } - - public void drawEllipseMouse(int x, int y, int xrad, int yrad, Color color) { - drawEllipseMouse_native(pointer, x, y, xrad, yrad, color); - } - - public void drawEllipseMouse(int x, int y, int xrad, int yrad, Color color, boolean isSolid) { - drawEllipseMouse_native(pointer, x, y, xrad, yrad, color, isSolid); - } - - public void drawEllipseMouse(Position p, int xrad, int yrad, Color color) { - drawEllipseMouse_native(pointer, p, xrad, yrad, color); - } - - public void drawEllipseMouse(Position p, int xrad, int yrad, Color color, boolean isSolid) { - drawEllipseMouse_native(pointer, p, xrad, yrad, color, isSolid); - } - - public void drawEllipseScreen(int x, int y, int xrad, int yrad, Color color) { - drawEllipseScreen_native(pointer, x, y, xrad, yrad, color); - } - - public void drawEllipseScreen(int x, int y, int xrad, int yrad, Color color, boolean isSolid) { - drawEllipseScreen_native(pointer, x, y, xrad, yrad, color, isSolid); - } - - public void drawEllipseScreen(Position p, int xrad, int yrad, Color color) { - drawEllipseScreen_native(pointer, p, xrad, yrad, color); - } - - public void drawEllipseScreen(Position p, int xrad, int yrad, Color color, boolean isSolid) { - drawEllipseScreen_native(pointer, p, xrad, yrad, color, isSolid); - } - - public void drawDot(bwapi4.CoordinateType.Enum ctype, int x, int y, Color color) { - drawDot_native(pointer, ctype, x, y, color); - } - - public void drawDotMap(int x, int y, Color color) { - drawDotMap_native(pointer, x, y, color); - } - - public void drawDotMap(Position p, Color color) { - drawDotMap_native(pointer, p, color); - } - - public void drawDotMouse(int x, int y, Color color) { - drawDotMouse_native(pointer, x, y, color); - } - - public void drawDotMouse(Position p, Color color) { - drawDotMouse_native(pointer, p, color); - } - - public void drawDotScreen(int x, int y, Color color) { - drawDotScreen_native(pointer, x, y, color); - } - - public void drawDotScreen(Position p, Color color) { - drawDotScreen_native(pointer, p, color); - } - - public void drawLine(bwapi4.CoordinateType.Enum ctype, int x1, int y1, int x2, int y2, Color color) { - drawLine_native(pointer, ctype, x1, y1, x2, y2, color); - } - - public void drawLineMap(int x1, int y1, int x2, int y2, Color color) { - drawLineMap_native(pointer, x1, y1, x2, y2, color); - } - - public void drawLineMap(Position a, Position b, Color color) { - drawLineMap_native(pointer, a, b, color); - } - - public void drawLineMouse(int x1, int y1, int x2, int y2, Color color) { - drawLineMouse_native(pointer, x1, y1, x2, y2, color); - } - - public void drawLineMouse(Position a, Position b, Color color) { - drawLineMouse_native(pointer, a, b, color); - } - - public void drawLineScreen(int x1, int y1, int x2, int y2, Color color) { - drawLineScreen_native(pointer, x1, y1, x2, y2, color); - } - - public void drawLineScreen(Position a, Position b, Color color) { - drawLineScreen_native(pointer, a, b, color); - } - - public int getLatencyFrames() { - return getLatencyFrames_native(pointer); - } - - public int getLatencyTime() { - return getLatencyTime_native(pointer); - } - - public int getRemainingLatencyFrames() { - return getRemainingLatencyFrames_native(pointer); - } - - public int getRemainingLatencyTime() { - return getRemainingLatencyTime_native(pointer); - } - - public int getRevision() { - return getRevision_native(pointer); - } - - public boolean isDebug() { - return isDebug_native(pointer); - } - - public boolean isLatComEnabled() { - return isLatComEnabled_native(pointer); - } - - public void setLatCom(boolean isEnabled) { - setLatCom_native(pointer, isEnabled); - } - - public boolean isGUIEnabled() { - return isGUIEnabled_native(pointer); - } - - public void setGUI(boolean enabled) { - setGUI_native(pointer, enabled); - } - - public int getInstanceNumber() { - return getInstanceNumber_native(pointer); - } - - public int getAPM() { - return getAPM_native(pointer); - } - - public int getAPM(boolean includeSelects) { - return getAPM_native(pointer, includeSelects); - } - - public boolean setMap(String cstr_mapFileName) { - return setMap_native(pointer, cstr_mapFileName); - } - - public void setFrameSkip(int frameSkip) { - setFrameSkip_native(pointer, frameSkip); - } - - public boolean hasPath(Position source, Position destination) { - return hasPath_native(pointer, source, destination); - } - - public boolean setAlliance(Player player, boolean allied) { - return setAlliance_native(pointer, player, allied); - } - - public boolean setAlliance(Player player) { - return setAlliance_native(pointer, player); - } - - public boolean setAlliance(Player player, boolean allied, boolean alliedVictory) { - return setAlliance_native(pointer, player, allied, alliedVictory); - } - - public boolean setVision(Player player) { - return setVision_native(pointer, player); - } - - public boolean setVision(Player player, boolean enabled) { - return setVision_native(pointer, player, enabled); - } - - public int elapsedTime() { - return elapsedTime_native(pointer); - } - - public void setCommandOptimizationLevel(int level) { - setCommandOptimizationLevel_native(pointer, level); - } - - public int countdownTimer() { - return countdownTimer_native(pointer); - } - - public List getAllRegions() { - return getAllRegions_native(pointer); - } - - public Region getRegionAt(int x, int y) { - return getRegionAt_native(pointer, x, y); - } - - public Region getRegionAt(Position position) { - return getRegionAt_native(pointer, position); - } - - public int getLastEventTime() { - return getLastEventTime_native(pointer); - } - - public boolean setRevealAll() { - return setRevealAll_native(pointer); - } - - public boolean setRevealAll(boolean reveal) { - return setRevealAll_native(pointer, reveal); - } - - public TilePosition getBuildLocation(UnitType type, TilePosition desiredPosition, int maxRange) { - return getBuildLocation_native(pointer, type, desiredPosition, maxRange); - } - - public TilePosition getBuildLocation(UnitType type, TilePosition desiredPosition) { - return getBuildLocation_native(pointer, type, desiredPosition); - } - - public TilePosition getBuildLocation(UnitType type, TilePosition desiredPosition, int maxRange, boolean creep) { - return getBuildLocation_native(pointer, type, desiredPosition, maxRange, creep); - } - - public int getDamageFrom(UnitType fromType, UnitType toType, Player fromPlayer) { - return getDamageFrom_native(pointer, fromType, toType, fromPlayer); - } - - public int getDamageFrom(UnitType fromType, UnitType toType) { - return getDamageFrom_native(pointer, fromType, toType); - } - - public int getDamageFrom(UnitType fromType, UnitType toType, Player fromPlayer, Player toPlayer) { - return getDamageFrom_native(pointer, fromType, toType, fromPlayer, toPlayer); - } - - public int getDamageTo(UnitType toType, UnitType fromType, Player toPlayer) { - return getDamageTo_native(pointer, toType, fromType, toPlayer); - } - - public int getDamageTo(UnitType toType, UnitType fromType) { - return getDamageTo_native(pointer, toType, fromType); - } - - public int getDamageTo(UnitType toType, UnitType fromType, Player toPlayer, Player fromPlayer) { - return getDamageTo_native(pointer, toType, fromType, toPlayer, fromPlayer); - } - - - private static Map instances = new HashMap(); - - private Game(long pointer) { - this.pointer = pointer; - } - - private static Game get(long pointer) { - if (pointer == 0 ) { - return null; - } - Game instance = instances.get(pointer); - if (instance == null ) { - instance = new Game(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native List getForces_native(long pointer); - - private native List getPlayers_native(long pointer); - - private native List getAllUnits_native(long pointer); - - private native List getMinerals_native(long pointer); - - private native List getGeysers_native(long pointer); - - private native List getNeutralUnits_native(long pointer); - - private native List getStaticMinerals_native(long pointer); - - private native List getStaticGeysers_native(long pointer); - - private native List getStaticNeutralUnits_native(long pointer); - - private native List getBullets_native(long pointer); - - private native Force getForce_native(long pointer, int forceID); - - private native Player getPlayer_native(long pointer, int playerID); - - private native Unit getUnit_native(long pointer, int unitID); - - private native Unit indexToUnit_native(long pointer, int unitIndex); - - private native Region getRegion_native(long pointer, int regionID); - - private native GameType getGameType_native(long pointer); - - private native int getLatency_native(long pointer); - - private native int getFrameCount_native(long pointer); - - private native int getReplayFrameCount_native(long pointer); - - private native int getFPS_native(long pointer); - - private native double getAverageFPS_native(long pointer); - - private native Position getMousePosition_native(long pointer); - - private native boolean getMouseState_native(long pointer, MouseButton button); - - private native boolean getKeyState_native(long pointer, Key key); - - private native Position getScreenPosition_native(long pointer); - - private native void setScreenPosition_native(long pointer, int x, int y); - - private native void setScreenPosition_native(long pointer, Position p); - - private native void pingMinimap_native(long pointer, int x, int y); - - private native void pingMinimap_native(long pointer, Position p); - - private native boolean isFlagEnabled_native(long pointer, int flag); - - private native void enableFlag_native(long pointer, int flag); - - private native Error getLastError_native(long pointer); - - private native boolean setLastError_native(long pointer); - - private native boolean setLastError_native(long pointer, Error e); - - private native int mapWidth_native(long pointer); - - private native int mapHeight_native(long pointer); - - private native String mapFileName_native(long pointer); - - private native String mapPathName_native(long pointer); - - private native String mapName_native(long pointer); - - private native String mapHash_native(long pointer); - - private native boolean isWalkable_native(long pointer, int walkX, int walkY); - - private native boolean isWalkable_native(long pointer, WalkPosition position); - - private native int getGroundHeight_native(long pointer, int tileX, int tileY); - - private native int getGroundHeight_native(long pointer, TilePosition position); - - private native boolean isBuildable_native(long pointer, int tileX, int tileY); - - private native boolean isBuildable_native(long pointer, int tileX, int tileY, boolean includeBuildings); - - private native boolean isBuildable_native(long pointer, TilePosition position); - - private native boolean isBuildable_native(long pointer, TilePosition position, boolean includeBuildings); - - private native boolean isVisible_native(long pointer, int tileX, int tileY); - - private native boolean isVisible_native(long pointer, TilePosition position); - - private native boolean isExplored_native(long pointer, int tileX, int tileY); - - private native boolean isExplored_native(long pointer, TilePosition position); - - private native boolean hasCreep_native(long pointer, int tileX, int tileY); - - private native boolean hasCreep_native(long pointer, TilePosition position); - - private native boolean hasPowerPrecise_native(long pointer, int x, int y); - - private native boolean hasPowerPrecise_native(long pointer, int x, int y, UnitType unitType); - - private native boolean hasPowerPrecise_native(long pointer, Position position); - - private native boolean hasPowerPrecise_native(long pointer, Position position, UnitType unitType); - - private native boolean hasPower_native(long pointer, int tileX, int tileY); - - private native boolean hasPower_native(long pointer, int tileX, int tileY, UnitType unitType); - - private native boolean hasPower_native(long pointer, TilePosition position); - - private native boolean hasPower_native(long pointer, TilePosition position, UnitType unitType); - - private native boolean hasPower_native(long pointer, int tileX, int tileY, int tileWidth, int tileHeight); - - private native boolean hasPower_native(long pointer, int tileX, int tileY, int tileWidth, int tileHeight, UnitType unitType); - - private native boolean hasPower_native(long pointer, TilePosition position, int tileWidth, int tileHeight); - - private native boolean hasPower_native(long pointer, TilePosition position, int tileWidth, int tileHeight, UnitType unitType); - - private native boolean canBuildHere_native(long pointer, TilePosition position, UnitType type, Unit builder); - - private native boolean canBuildHere_native(long pointer, TilePosition position, UnitType type); - - private native boolean canBuildHere_native(long pointer, TilePosition position, UnitType type, Unit builder, boolean checkExplored); - - private native boolean canMake_native(long pointer, UnitType type); - - private native boolean canMake_native(long pointer, UnitType type, Unit builder); - - private native boolean canResearch_native(long pointer, TechType type, Unit unit); - - private native boolean canResearch_native(long pointer, TechType type); - - private native boolean canResearch_native(long pointer, TechType type, Unit unit, boolean checkCanIssueCommandType); - - private native boolean canUpgrade_native(long pointer, UpgradeType type, Unit unit); - - private native boolean canUpgrade_native(long pointer, UpgradeType type); - - private native boolean canUpgrade_native(long pointer, UpgradeType type, Unit unit, boolean checkCanIssueCommandType); - - private native void printf_native(long pointer, String cstr_format); - - private native void sendText_native(long pointer, String cstr_format); - - private native void sendTextEx_native(long pointer, boolean toAllies, String cstr_format); - - private native boolean isInGame_native(long pointer); - - private native boolean isMultiplayer_native(long pointer); - - private native boolean isBattleNet_native(long pointer); - - private native boolean isPaused_native(long pointer); - - private native boolean isReplay_native(long pointer); - - private native void pauseGame_native(long pointer); - - private native void resumeGame_native(long pointer); - - private native void leaveGame_native(long pointer); - - private native void restartGame_native(long pointer); - - private native void setLocalSpeed_native(long pointer, int speed); - - private native boolean issueCommand_native(long pointer, List units, UnitCommand command); - - private native List getSelectedUnits_native(long pointer); - - private native Player self_native(long pointer); - - private native Player enemy_native(long pointer); - - private native Player neutral_native(long pointer); - - private native List allies_native(long pointer); - - private native List enemies_native(long pointer); - - private native List observers_native(long pointer); - - private native void setTextSize_native(long pointer); - - private native void setTextSize_native(long pointer, bwapi4.Text.Size.Enum size); - - private native void drawText_native(long pointer, bwapi4.CoordinateType.Enum ctype, int x, int y, String cstr_format); - - private native void drawTextMap_native(long pointer, int x, int y, String cstr_format); - - private native void drawTextMap_native(long pointer, Position p, String cstr_format); - - private native void drawTextMouse_native(long pointer, int x, int y, String cstr_format); - - private native void drawTextMouse_native(long pointer, Position p, String cstr_format); - - private native void drawTextScreen_native(long pointer, int x, int y, String cstr_format); - - private native void drawTextScreen_native(long pointer, Position p, String cstr_format); - - private native void drawBox_native(long pointer, bwapi4.CoordinateType.Enum ctype, int left, int top, int right, int bottom, Color color); - - private native void drawBox_native(long pointer, bwapi4.CoordinateType.Enum ctype, int left, int top, int right, int bottom, Color color, boolean isSolid); - - private native void drawBoxMap_native(long pointer, int left, int top, int right, int bottom, Color color); - - private native void drawBoxMap_native(long pointer, int left, int top, int right, int bottom, Color color, boolean isSolid); - - private native void drawBoxMap_native(long pointer, Position leftTop, Position rightBottom, Color color); - - private native void drawBoxMap_native(long pointer, Position leftTop, Position rightBottom, Color color, boolean isSolid); - - private native void drawBoxMouse_native(long pointer, int left, int top, int right, int bottom, Color color); - - private native void drawBoxMouse_native(long pointer, int left, int top, int right, int bottom, Color color, boolean isSolid); - - private native void drawBoxMouse_native(long pointer, Position leftTop, Position rightBottom, Color color); - - private native void drawBoxMouse_native(long pointer, Position leftTop, Position rightBottom, Color color, boolean isSolid); - - private native void drawBoxScreen_native(long pointer, int left, int top, int right, int bottom, Color color); - - private native void drawBoxScreen_native(long pointer, int left, int top, int right, int bottom, Color color, boolean isSolid); - - private native void drawBoxScreen_native(long pointer, Position leftTop, Position rightBottom, Color color); - - private native void drawBoxScreen_native(long pointer, Position leftTop, Position rightBottom, Color color, boolean isSolid); - - private native void drawTriangle_native(long pointer, bwapi4.CoordinateType.Enum ctype, int ax, int ay, int bx, int by, int cx, int cy, Color color); - - private native void drawTriangle_native(long pointer, bwapi4.CoordinateType.Enum ctype, int ax, int ay, int bx, int by, int cx, int cy, Color color, boolean isSolid); - - private native void drawTriangleMap_native(long pointer, int ax, int ay, int bx, int by, int cx, int cy, Color color); - - private native void drawTriangleMap_native(long pointer, int ax, int ay, int bx, int by, int cx, int cy, Color color, boolean isSolid); - - private native void drawTriangleMap_native(long pointer, Position a, Position b, Position c, Color color); - - private native void drawTriangleMap_native(long pointer, Position a, Position b, Position c, Color color, boolean isSolid); - - private native void drawTriangleMouse_native(long pointer, int ax, int ay, int bx, int by, int cx, int cy, Color color); - - private native void drawTriangleMouse_native(long pointer, int ax, int ay, int bx, int by, int cx, int cy, Color color, boolean isSolid); - - private native void drawTriangleMouse_native(long pointer, Position a, Position b, Position c, Color color); - - private native void drawTriangleMouse_native(long pointer, Position a, Position b, Position c, Color color, boolean isSolid); - - private native void drawTriangleScreen_native(long pointer, int ax, int ay, int bx, int by, int cx, int cy, Color color); - - private native void drawTriangleScreen_native(long pointer, int ax, int ay, int bx, int by, int cx, int cy, Color color, boolean isSolid); - - private native void drawTriangleScreen_native(long pointer, Position a, Position b, Position c, Color color); - - private native void drawTriangleScreen_native(long pointer, Position a, Position b, Position c, Color color, boolean isSolid); - - private native void drawCircle_native(long pointer, bwapi4.CoordinateType.Enum ctype, int x, int y, int radius, Color color); - - private native void drawCircle_native(long pointer, bwapi4.CoordinateType.Enum ctype, int x, int y, int radius, Color color, boolean isSolid); - - private native void drawCircleMap_native(long pointer, int x, int y, int radius, Color color); - - private native void drawCircleMap_native(long pointer, int x, int y, int radius, Color color, boolean isSolid); - - private native void drawCircleMap_native(long pointer, Position p, int radius, Color color); - - private native void drawCircleMap_native(long pointer, Position p, int radius, Color color, boolean isSolid); - - private native void drawCircleMouse_native(long pointer, int x, int y, int radius, Color color); - - private native void drawCircleMouse_native(long pointer, int x, int y, int radius, Color color, boolean isSolid); - - private native void drawCircleMouse_native(long pointer, Position p, int radius, Color color); - - private native void drawCircleMouse_native(long pointer, Position p, int radius, Color color, boolean isSolid); - - private native void drawCircleScreen_native(long pointer, int x, int y, int radius, Color color); - - private native void drawCircleScreen_native(long pointer, int x, int y, int radius, Color color, boolean isSolid); - - private native void drawCircleScreen_native(long pointer, Position p, int radius, Color color); - - private native void drawCircleScreen_native(long pointer, Position p, int radius, Color color, boolean isSolid); - - private native void drawEllipse_native(long pointer, bwapi4.CoordinateType.Enum ctype, int x, int y, int xrad, int yrad, Color color); - - private native void drawEllipse_native(long pointer, bwapi4.CoordinateType.Enum ctype, int x, int y, int xrad, int yrad, Color color, boolean isSolid); - - private native void drawEllipseMap_native(long pointer, int x, int y, int xrad, int yrad, Color color); - - private native void drawEllipseMap_native(long pointer, int x, int y, int xrad, int yrad, Color color, boolean isSolid); - - private native void drawEllipseMap_native(long pointer, Position p, int xrad, int yrad, Color color); - - private native void drawEllipseMap_native(long pointer, Position p, int xrad, int yrad, Color color, boolean isSolid); - - private native void drawEllipseMouse_native(long pointer, int x, int y, int xrad, int yrad, Color color); - - private native void drawEllipseMouse_native(long pointer, int x, int y, int xrad, int yrad, Color color, boolean isSolid); - - private native void drawEllipseMouse_native(long pointer, Position p, int xrad, int yrad, Color color); - - private native void drawEllipseMouse_native(long pointer, Position p, int xrad, int yrad, Color color, boolean isSolid); - - private native void drawEllipseScreen_native(long pointer, int x, int y, int xrad, int yrad, Color color); - - private native void drawEllipseScreen_native(long pointer, int x, int y, int xrad, int yrad, Color color, boolean isSolid); - - private native void drawEllipseScreen_native(long pointer, Position p, int xrad, int yrad, Color color); - - private native void drawEllipseScreen_native(long pointer, Position p, int xrad, int yrad, Color color, boolean isSolid); - - private native void drawDot_native(long pointer, bwapi4.CoordinateType.Enum ctype, int x, int y, Color color); - - private native void drawDotMap_native(long pointer, int x, int y, Color color); - - private native void drawDotMap_native(long pointer, Position p, Color color); - - private native void drawDotMouse_native(long pointer, int x, int y, Color color); - - private native void drawDotMouse_native(long pointer, Position p, Color color); - - private native void drawDotScreen_native(long pointer, int x, int y, Color color); - - private native void drawDotScreen_native(long pointer, Position p, Color color); - - private native void drawLine_native(long pointer, bwapi4.CoordinateType.Enum ctype, int x1, int y1, int x2, int y2, Color color); - - private native void drawLineMap_native(long pointer, int x1, int y1, int x2, int y2, Color color); - - private native void drawLineMap_native(long pointer, Position a, Position b, Color color); - - private native void drawLineMouse_native(long pointer, int x1, int y1, int x2, int y2, Color color); - - private native void drawLineMouse_native(long pointer, Position a, Position b, Color color); - - private native void drawLineScreen_native(long pointer, int x1, int y1, int x2, int y2, Color color); - - private native void drawLineScreen_native(long pointer, Position a, Position b, Color color); - - private native int getLatencyFrames_native(long pointer); - - private native int getLatencyTime_native(long pointer); - - private native int getRemainingLatencyFrames_native(long pointer); - - private native int getRemainingLatencyTime_native(long pointer); - - private native int getRevision_native(long pointer); - - private native boolean isDebug_native(long pointer); - - private native boolean isLatComEnabled_native(long pointer); - - private native void setLatCom_native(long pointer, boolean isEnabled); - - private native boolean isGUIEnabled_native(long pointer); - - private native void setGUI_native(long pointer, boolean enabled); - - private native int getInstanceNumber_native(long pointer); - - private native int getAPM_native(long pointer); - - private native int getAPM_native(long pointer, boolean includeSelects); - - private native boolean setMap_native(long pointer, String cstr_mapFileName); - - private native void setFrameSkip_native(long pointer, int frameSkip); - - private native boolean hasPath_native(long pointer, Position source, Position destination); - - private native boolean setAlliance_native(long pointer, Player player, boolean allied); - - private native boolean setAlliance_native(long pointer, Player player); - - private native boolean setAlliance_native(long pointer, Player player, boolean allied, boolean alliedVictory); - - private native boolean setVision_native(long pointer, Player player); - - private native boolean setVision_native(long pointer, Player player, boolean enabled); - - private native int elapsedTime_native(long pointer); - - private native void setCommandOptimizationLevel_native(long pointer, int level); - - private native int countdownTimer_native(long pointer); - - private native List getAllRegions_native(long pointer); - - private native Region getRegionAt_native(long pointer, int x, int y); - - private native Region getRegionAt_native(long pointer, Position position); - - private native int getLastEventTime_native(long pointer); - - private native boolean setRevealAll_native(long pointer); - - private native boolean setRevealAll_native(long pointer, boolean reveal); - - private native TilePosition getBuildLocation_native(long pointer, UnitType type, TilePosition desiredPosition, int maxRange); - - private native TilePosition getBuildLocation_native(long pointer, UnitType type, TilePosition desiredPosition); - - private native TilePosition getBuildLocation_native(long pointer, UnitType type, TilePosition desiredPosition, int maxRange, boolean creep); - - private native int getDamageFrom_native(long pointer, UnitType fromType, UnitType toType, Player fromPlayer); - - private native int getDamageFrom_native(long pointer, UnitType fromType, UnitType toType); - - private native int getDamageFrom_native(long pointer, UnitType fromType, UnitType toType, Player fromPlayer, Player toPlayer); - - private native int getDamageTo_native(long pointer, UnitType toType, UnitType fromType, Player toPlayer); - - private native int getDamageTo_native(long pointer, UnitType toType, UnitType fromType); - - private native int getDamageTo_native(long pointer, UnitType toType, UnitType fromType, Player toPlayer, Player fromPlayer); - - -} diff --git a/bwapi4/GameType.java b/bwapi4/GameType.java deleted file mode 100644 index 5cc745d..0000000 --- a/bwapi4/GameType.java +++ /dev/null @@ -1,70 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class GameType { - - public String toString() { - return toString_native(pointer); - } - - public static GameType Melee; - - public static GameType Free_For_All; - - public static GameType One_on_One; - - public static GameType Capture_The_Flag; - - public static GameType Greed; - - public static GameType Slaughter; - - public static GameType Sudden_Death; - - public static GameType Ladder; - - public static GameType Use_Map_Settings; - - public static GameType Team_Melee; - - public static GameType Team_Free_For_All; - - public static GameType Team_Capture_The_Flag; - - public static GameType Top_vs_Bottom; - - public static GameType None; - - public static GameType Unknown; - - - private static Map instances = new HashMap(); - - private GameType(long pointer) { - this.pointer = pointer; - } - - private static GameType get(long pointer) { - if (pointer == 0 ) { - return null; - } - GameType instance = instances.get(pointer); - if (instance == null ) { - instance = new GameType(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String toString_native(long pointer); - - -} diff --git a/bwapi4/GameWrapper.java b/bwapi4/GameWrapper.java deleted file mode 100644 index 7efa2e4..0000000 --- a/bwapi4/GameWrapper.java +++ /dev/null @@ -1,40 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class GameWrapper { - - public void flush() { - flush_native(pointer); - } - - - private static Map instances = new HashMap(); - - private GameWrapper(long pointer) { - this.pointer = pointer; - } - - private static GameWrapper get(long pointer) { - if (pointer == 0 ) { - return null; - } - GameWrapper instance = instances.get(pointer); - if (instance == null ) { - instance = new GameWrapper(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native void flush_native(long pointer); - - -} diff --git a/bwapi4/InterfaceEvent.java b/bwapi4/InterfaceEvent.java deleted file mode 100644 index 47bfbbd..0000000 --- a/bwapi4/InterfaceEvent.java +++ /dev/null @@ -1,43 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class InterfaceEvent { - - public boolean isFinished() { - return isFinished_native(pointer); - } - - public void removeEvent() { - removeEvent_native(pointer); - } - - - private static Map instances = new HashMap(); - - private InterfaceEvent(long pointer) { - this.pointer = pointer; - } - - private static InterfaceEvent get(long pointer) { - InterfaceEvent instance = instances.get(pointer); - if (instance == null ) { - instance = new InterfaceEvent(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native boolean isFinished_native(long pointer); - - private native void removeEvent_native(long pointer); - - -} diff --git a/bwapi4/Key.java b/bwapi4/Key.java deleted file mode 100644 index da6c5d3..0000000 --- a/bwapi4/Key.java +++ /dev/null @@ -1,251 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public enum Key { - - K_LBUTTON(1), - K_RBUTTON(2), - K_CANCEL(3), - K_MBUTTON(4), - K_XBUTTON1(5), - K_XBUTTON2(6), - __UNDEFINED_7(7), - K_BACK(8), - K_TAB(9), - __RESERVED_A(10), - __RESERVED_B(11), - K_CLEAR(12), - K_RETURN(13), - __UNDEFINED_E(14), - __UNDEFINED_F(15), - K_SHIFT(16), - K_CONTROL(17), - K_MENU(18), - K_PAUSE(19), - K_CAPITAL(20), - K_KANA(21), - K_UNDEFINED_16(22), - K_JUNJA(23), - K_FINAL(24), - K_KANJI(25), - __UNDEFINED_1A(26), - K_ESCAPE(27), - K_CONVERT(28), - K_NONCONVERT(29), - K_ACCEPT(30), - K_MODECHANGE(31), - K_SPACE(32), - K_PRIOR(33), - K_NEXT(34), - K_END(35), - K_HOME(36), - K_LEFT(37), - K_UP(38), - K_RIGHT(39), - K_DOWN(40), - K_SELECT(41), - K_PRINT(42), - K_EXECUTE(43), - K_SNAPSHOT(44), - K_INSERT(45), - K_DELETE(46), - K_HELP(47), - K_0(48), - K_1(49), - K_2(50), - K_3(51), - K_4(52), - K_5(53), - K_6(54), - K_7(55), - K_8(56), - K_9(57), - __UNDEFINED_3A(58), - __UNDEFINED_3B(59), - __UNDEFINED_3C(60), - __UNDEFINED_3D(61), - __UNDEFINED_3E(62), - __UNDEFINED_3F(63), - __UNDEFINED_40(64), - K_A(65), - K_B(66), - K_C(67), - K_D(68), - K_E(69), - K_F(70), - K_G(71), - K_H(72), - K_I(73), - K_J(74), - K_K(75), - K_L(76), - K_M(77), - K_N(78), - K_O(79), - K_P(80), - K_Q(81), - K_R(82), - K_S(83), - K_T(84), - K_U(85), - K_V(86), - K_W(87), - K_X(88), - K_Y(89), - K_Z(90), - K_LWIN(91), - K_RWIN(92), - K_APPS(93), - __RESERVED_5E(94), - K_SLEEP(95), - K_NUMPAD0(96), - K_NUMPAD1(97), - K_NUMPAD2(98), - K_NUMPAD3(99), - K_NUMPAD4(100), - K_NUMPAD5(101), - K_NUMPAD6(102), - K_NUMPAD7(103), - K_NUMPAD8(104), - K_NUMPAD9(105), - K_MULTIPLY(106), - K_ADD(107), - K_SEPARATOR(108), - K_SUBTRACT(109), - K_DECIMAL(110), - K_DIVIDE(111), - K_F1(112), - K_F2(113), - K_F3(114), - K_F4(115), - K_F5(116), - K_F6(117), - K_F7(118), - K_F8(119), - K_F9(120), - K_F10(121), - K_F11(122), - K_F12(123), - K_F13(124), - K_F14(125), - K_F15(126), - K_F16(127), - K_F17(128), - K_F18(129), - K_F19(130), - K_F20(131), - K_F21(132), - K_F22(133), - K_F23(134), - K_F24(135), - __UNASSIGNED_88(136), - __UNASSIGNED_89(137), - __UNASSIGNED_8A(138), - __UNASSIGNED_8B(139), - __UNASSIGNED_8C(140), - __UNASSIGNED_8D(141), - __UNASSIGNED_8E(142), - __UNASSIGNED_8F(143), - K_NUMLOCK(144), - K_SCROLL(145), - K_OEM_NEC_EQUAL(146), - K_OEM_FJ_JISHO(147), - K_OEM_FJ_MASSHOU(148), - K_OEM_FJ_TOUROKU(149), - K_OEM_FJ_LOYA(150), - __UNASSIGNED_97(151), - __UNASSIGNED_98(152), - __UNASSIGNED_99(153), - __UNASSIGNED_9A(154), - __UNASSIGNED_9B(155), - __UNASSIGNED_9C(156), - __UNASSIGNED_9D(157), - __UNASSIGNED_9E(158), - __UNASSIGNED_9F(159), - K_LSHIFT(160), - K_RSHIFT(161), - K_LCONTROL(162), - K_RCONTROL(163), - K_LMENU(164), - K_RMENU(165), - K_BROWSER_BACK(166), - K_BROWSER_FORWARD(167), - K_BROWSER_REFRESH(168), - K_BROWSER_STOP(169), - K_BROWSER_SEARCH(170), - K_BROWSER_FAVORITES(171), - K_BROWSER_HOME(172), - K_VOLUME_MUTE(173), - K_VOLUME_DOWN(174), - K_VOLUME_UP(175), - K_MEDIA_NEXT_TRACK(176), - K_MEDIA_PREV_TRACK(177), - K_MEDIA_STOP(178), - K_MEDIA_PLAY_PAUSE(179), - K_LAUNCH_MAIL(180), - K_LAUNCH_MEDIA_SELECT(181), - K_LAUNCH_APP1(182), - K_LAUNCH_APP2(183), - __RESERVED_B8(184), - __RESERVED_B9(185), - K_OEM_1(186), - K_OEM_PLUS(187), - K_OEM_COMMA(188), - K_OEM_MINUS(189), - K_OEM_PERIOD(190), - K_OEM_2(191), - K_OEM_3(192), - K_OEM_4(219), - K_OEM_5(220), - K_OEM_6(221), - K_OEM_7(222), - K_OEM_8(223), - __RESERVED_E0(224), - K_OEM_AX(225), - K_OEM_102(226), - K_ICO_HELP(227), - K_ICO_00(228), - K_PROCESSKEY(229), - K_ICO_CLEAR(230), - K_PACKET(231), - __UNASSIGNED_E8(232), - K_OEM_RESET(233), - K_OEM_JUMP(234), - K_OEM_PA1(235), - K_OEM_PA2(236), - K_OEM_PA3(237), - K_OEM_WSCTRL(238), - K_OEM_CUSEL(239), - K_OEM_ATTN(240), - K_OEM_FINISH(241), - K_OEM_COPY(242), - K_OEM_AUTO(243), - K_OEM_ENLW(244), - K_OEM_BACKTAB(245), - K_ATTN(246), - K_CRSEL(247), - K_EXSEL(248), - K_EREOF(249), - K_PLAY(250), - K_ZOOM(251), - K_NONAME(252), - K_PA1(253), - K_OEM_CLEAR(254); - - private int value; - - public int getValue(){ - return value; - } - - Key(int value){ - this.value = value; - } - -} diff --git a/bwapi4/Latency/Enum.java b/bwapi4/Latency/Enum.java deleted file mode 100644 index 6bb6bc2..0000000 --- a/bwapi4/Latency/Enum.java +++ /dev/null @@ -1,29 +0,0 @@ -package bwapi4.Latency; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public enum Enum { - - SinglePlayer(2), - LanLow(5), - LanMedium(7), - LanHigh(9), - BattlenetLow(14), - BattlenetMedium(19); - - private int value; - - public int getValue(){ - return value; - } - - Enum(int value){ - this.value = value; - } - -} diff --git a/bwapi4/Mirror.java b/bwapi4/Mirror.java deleted file mode 100644 index 59235f0..0000000 --- a/bwapi4/Mirror.java +++ /dev/null @@ -1,262 +0,0 @@ -package bwapi4; - -import bwapi4.AIModule; -import bwapi4.BWEventListener; - -import java.io.*; -import java.io.File; -import java.lang.Exception; -import java.lang.UnsupportedOperationException; -import java.util.*; -import java.util.zip.*; - -/** - *

The API entry point. Standard use case:

- *
    - *
  • Create a Mirror object and use {@link #getModule()} and then set an {@link AIModule}'s {@link BWEventListener}
    - *
  • Call {@link #startGame()} to init the API and connect to Broodwar, then launch Broodwar from ChaosLauncher.
  • - *
  • In you {@link BWEventListener#onStart()} method, receive the Game object by calling {@link #getGame()}
  • - *
- *
- * Example - *
- *     {@code
- *
- *     mirror.getModule().setEventListener(new DefaultBWListener()
- *     {
- *            public void onStart() {
- *                game = mirror.getGame();
- *                self = game.self();
- *                //initialization
- *                ....
- *            }
- *
- *           public void onUpdate() {
- *               for (Unit myUnit : self.getUnits()) {
- *                   //give orders to unit
- *                   ...
- *                }
- *           }
- *        });
- *     }
- *     mirror.startGame();
- * 
- - *

Note: The Game object is initialized during the {@link #startGame()} as well as other BWMirror API's constants. - * Do not use any API releated methods/fields prior to {@link #startGame()}.

- - */ -public class Mirror { - - private Game game; - - private AIModule module = new AIModule(); - - private FrameCallback frameCallback; - - private static final boolean EXTRACT_JAR = true; - - private static final String VERSION = "2_0"; - - static { - String arch = System.getProperty("os.arch"); - String dllNames[] = {"BWAPI4", "gmp-vc90-mt", "mpfr-vc90-mt"}; - if(!arch.equals("x86")){ - throw new UnsupportedOperationException("BWMirror API supports only x86 architecture."); - } - try { - if (EXTRACT_JAR) { - System.setProperty("java.library.path", "."); - java.lang.reflect.Field fieldSysPath = ClassLoader.class.getDeclaredField("sys_paths"); - fieldSysPath.setAccessible(true); - fieldSysPath.set(null, null); - - String path = Mirror.class.getProtectionDomain().getCodeSource().getLocation().getPath(); - String decodedPath = java.net.URLDecoder.decode(path, "UTF-8"); - - for (String dllName : dllNames) { - String dllNameExt = dllName + ".dll"; - if (!new File(dllNameExt).exists()) { - JarResources jar = new JarResources(path); - byte[] correctDllData = jar.getResource(dllNameExt); - FileOutputStream funnyStream = new FileOutputStream(dllNameExt); - funnyStream.write(correctDllData); - funnyStream.close(); - } - } - } - } catch (Exception e) { - System.err.println("Failed to extract native libraries.\n" + e); - } - - System.loadLibrary(dllNames[0]); - - File dataDir = new File("bwapi-data/BWTA"); - if(!dataDir.exists()){ - try { - dataDir.mkdirs(); - } catch (Exception e) { - System.err.println("Unable to create /bwapi-data/BWTA folder, BWTA analysis will not be saved."); - } - } - } - - public Game getGame() { - return game; - } - - public AIModule getModule() { - return module; - } - - /** - * Starts the API, initializes all constants ( {@link UnitType}, {@link WeaponType} ) and the {@link Game} object. - * This method blocks until the end of game. - */ - public native void startGame(); - - private void update() { - if (frameCallback != null) { - frameCallback.update(); - } - } - - /*public void setFrameCallback(bwapi.Mirror.FrameCallback frameCallback) { - this.frameCallback = frameCallback; - } */ - - /** - * The simplest interface to receive update event from Broodwar. The {@link #update()} method is called once each frame. - * For a simple bot and implementation of this interface is enough, to receive all in game events, implement {@link BWEventListener}. - */ - /*public*/ private interface FrameCallback { - public void update(); - } - - @SuppressWarnings({"unchecked"}) - private static class JarResources { - - // external debug flag - public boolean debugOn = false; - - // jar resource mapping tables - private Hashtable htSizes = new Hashtable(); - private Hashtable htJarContents = new Hashtable(); - - // a jar file - private String jarFileName; - - /** - * creates a javabot.JarResources. It extracts all resources from a Jar - * into an internal hashtable, keyed by resource names. - * - * @param jarFileName a jar or zip file - */ - public JarResources(String jarFileName) { - this.jarFileName = jarFileName; - init(); - } - - /** - * Extracts a jar resource as a blob. - * - * @param name a resource name. - */ - public byte[] getResource(String name) { - return (byte[]) htJarContents.get(name); - } - - /** - * initializes internal hash tables with Jar file resources. - */ - private void init() { - try { - // extracts just sizes only. - ZipFile zf = new ZipFile(jarFileName); - Enumeration e = zf.entries(); - while (e.hasMoreElements()) { - ZipEntry ze = (ZipEntry) e.nextElement(); - if (debugOn) { - System.out.println(dumpZipEntry(ze)); - } - htSizes.put(ze.getName(), new Integer((int) ze.getSize())); - } - zf.close(); - - // extract resources and put them into the hashtable. - FileInputStream fis = new FileInputStream(jarFileName); - BufferedInputStream bis = new BufferedInputStream(fis); - ZipInputStream zis = new ZipInputStream(bis); - ZipEntry ze = null; - while ((ze = zis.getNextEntry()) != null) { - if (ze.isDirectory()) { - continue; - } - if (debugOn) { - System.out.println( - "ze.getName()=" + ze.getName() + "," + "getSize()=" + ze.getSize() - ); - } - int size = (int) ze.getSize(); - // -1 means unknown size. - if (size == -1) { - size = ((Integer) htSizes.get(ze.getName())).intValue(); - } - byte[] b = new byte[(int) size]; - int rb = 0; - int chunk = 0; - while (((int) size - rb) > 0) { - chunk = zis.read(b, rb, (int) size - rb); - if (chunk == -1) { - break; - } - rb += chunk; - } - // add to internal resource hashtable - htJarContents.put(ze.getName(), b); - if (debugOn) { - System.out.println( - ze.getName() + " rb=" + rb + - ",size=" + size + - ",csize=" + ze.getCompressedSize() - ); - } - } - } catch (NullPointerException e) { - System.out.println("done."); - } catch (FileNotFoundException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } - } - - /** - * Dumps a zip entry into a string. - * - * @param ze a ZipEntry - */ - private String dumpZipEntry(ZipEntry ze) { - StringBuffer sb = new StringBuffer(); - if (ze.isDirectory()) { - sb.append("d "); - } else { - sb.append("f "); - } - if (ze.getMethod() == ZipEntry.STORED) { - sb.append("stored "); - } else { - sb.append("defalted "); - } - sb.append(ze.getName()); - sb.append("\t"); - sb.append("" + ze.getSize()); - if (ze.getMethod() == ZipEntry.DEFLATED) { - sb.append("/" + ze.getCompressedSize()); - } - return (sb.toString()); - } - - - } -} \ No newline at end of file diff --git a/bwapi4/MouseButton.java b/bwapi4/MouseButton.java deleted file mode 100644 index a93843a..0000000 --- a/bwapi4/MouseButton.java +++ /dev/null @@ -1,27 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public enum MouseButton { - - M_LEFT(0), - M_RIGHT(1), - M_MIDDLE(2), - M_MAX(3); - - private int value; - - public int getValue(){ - return value; - } - - MouseButton(int value){ - this.value = value; - } - -} diff --git a/bwapi4/Order.java b/bwapi4/Order.java deleted file mode 100644 index 7986a9c..0000000 --- a/bwapi4/Order.java +++ /dev/null @@ -1,346 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Order { - - public static Order Die; - - public static Order Stop; - - public static Order Guard; - - public static Order PlayerGuard; - - public static Order TurretGuard; - - public static Order BunkerGuard; - - public static Order Move; - - public static Order AttackUnit; - - public static Order AttackTile; - - public static Order Hover; - - public static Order AttackMove; - - public static Order InfestedCommandCenter; - - public static Order UnusedNothing; - - public static Order UnusedPowerup; - - public static Order TowerGuard; - - public static Order VultureMine; - - public static Order Nothing; - - public static Order CastInfestation; - - public static Order InfestingCommandCenter; - - public static Order PlaceBuilding; - - public static Order CreateProtossBuilding; - - public static Order ConstructingBuilding; - - public static Order Repair; - - public static Order PlaceAddon; - - public static Order BuildAddon; - - public static Order Train; - - public static Order RallyPointUnit; - - public static Order RallyPointTile; - - public static Order ZergBirth; - - public static Order ZergUnitMorph; - - public static Order ZergBuildingMorph; - - public static Order IncompleteBuilding; - - public static Order BuildNydusExit; - - public static Order EnterNydusCanal; - - public static Order Follow; - - public static Order Carrier; - - public static Order ReaverCarrierMove; - - public static Order CarrierIgnore2; - - public static Order Reaver; - - public static Order TrainFighter; - - public static Order InterceptorAttack; - - public static Order ScarabAttack; - - public static Order RechargeShieldsUnit; - - public static Order RechargeShieldsBattery; - - public static Order ShieldBattery; - - public static Order InterceptorReturn; - - public static Order BuildingLand; - - public static Order BuildingLiftOff; - - public static Order DroneLiftOff; - - public static Order LiftingOff; - - public static Order ResearchTech; - - public static Order Upgrade; - - public static Order Larva; - - public static Order SpawningLarva; - - public static Order Harvest1; - - public static Order Harvest2; - - public static Order MoveToGas; - - public static Order WaitForGas; - - public static Order HarvestGas; - - public static Order ReturnGas; - - public static Order MoveToMinerals; - - public static Order WaitForMinerals; - - public static Order MiningMinerals; - - public static Order Harvest3; - - public static Order Harvest4; - - public static Order ReturnMinerals; - - public static Order Interrupted; - - public static Order EnterTransport; - - public static Order PickupIdle; - - public static Order PickupTransport; - - public static Order PickupBunker; - - public static Order Pickup4; - - public static Order PowerupIdle; - - public static Order Sieging; - - public static Order Unsieging; - - public static Order InitCreepGrowth; - - public static Order SpreadCreep; - - public static Order StoppingCreepGrowth; - - public static Order GuardianAspect; - - public static Order ArchonWarp; - - public static Order CompletingArchonSummon; - - public static Order HoldPosition; - - public static Order Cloak; - - public static Order Decloak; - - public static Order Unload; - - public static Order MoveUnload; - - public static Order FireYamatoGun; - - public static Order CastLockdown; - - public static Order Burrowing; - - public static Order Burrowed; - - public static Order Unburrowing; - - public static Order CastDarkSwarm; - - public static Order CastParasite; - - public static Order CastSpawnBroodlings; - - public static Order CastEMPShockwave; - - public static Order NukeWait; - - public static Order NukeTrain; - - public static Order NukeLaunch; - - public static Order NukePaint; - - public static Order NukeUnit; - - public static Order CastNuclearStrike; - - public static Order NukeTrack; - - public static Order CloakNearbyUnits; - - public static Order PlaceMine; - - public static Order RightClickAction; - - public static Order CastRecall; - - public static Order Teleport; - - public static Order CastScannerSweep; - - public static Order Scanner; - - public static Order CastDefensiveMatrix; - - public static Order CastPsionicStorm; - - public static Order CastIrradiate; - - public static Order CastPlague; - - public static Order CastConsume; - - public static Order CastEnsnare; - - public static Order CastStasisField; - - public static Order CastHallucination; - - public static Order Hallucination2; - - public static Order ResetCollision; - - public static Order Patrol; - - public static Order CTFCOPInit; - - public static Order CTFCOPStarted; - - public static Order CTFCOP2; - - public static Order ComputerAI; - - public static Order AtkMoveEP; - - public static Order HarassMove; - - public static Order AIPatrol; - - public static Order GuardPost; - - public static Order RescuePassive; - - public static Order Neutral; - - public static Order ComputerReturn; - - public static Order SelfDestructing; - - public static Order Critter; - - public static Order HiddenGun; - - public static Order OpenDoor; - - public static Order CloseDoor; - - public static Order HideTrap; - - public static Order RevealTrap; - - public static Order EnableDoodad; - - public static Order DisableDoodad; - - public static Order WarpIn; - - public static Order Medic; - - public static Order MedicHeal; - - public static Order HealMove; - - public static Order MedicHealToIdle; - - public static Order CastRestoration; - - public static Order CastDisruptionWeb; - - public static Order CastMindControl; - - public static Order DarkArchonMeld; - - public static Order CastFeedback; - - public static Order CastOpticalFlare; - - public static Order CastMaelstrom; - - public static Order JunkYardDog; - - public static Order Fatal; - - public static Order None; - - public static Order Unknown; - - - private static Map instances = new HashMap(); - - private Order(long pointer) { - this.pointer = pointer; - } - - private static Order get(long pointer) { - if (pointer == 0 ) { - return null; - } - Order instance = instances.get(pointer); - if (instance == null ) { - instance = new Order(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - -} diff --git a/bwapi4/Player.java b/bwapi4/Player.java deleted file mode 100644 index ba47b47..0000000 --- a/bwapi4/Player.java +++ /dev/null @@ -1,400 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Player { - - public int getID() { - return getID_native(pointer); - } - - public String getName() { - return getName_native(pointer); - } - - public List getUnits() { - return getUnits_native(pointer); - } - - public Race getRace() { - return getRace_native(pointer); - } - - public PlayerType getType() { - return getType_native(pointer); - } - - public Force getForce() { - return getForce_native(pointer); - } - - public boolean isAlly(Player player) { - return isAlly_native(pointer, player); - } - - public boolean isEnemy(Player player) { - return isEnemy_native(pointer, player); - } - - public boolean isNeutral() { - return isNeutral_native(pointer); - } - - public TilePosition getStartLocation() { - return getStartLocation_native(pointer); - } - - public boolean isVictorious() { - return isVictorious_native(pointer); - } - - public boolean isDefeated() { - return isDefeated_native(pointer); - } - - public boolean leftGame() { - return leftGame_native(pointer); - } - - public int minerals() { - return minerals_native(pointer); - } - - public int gas() { - return gas_native(pointer); - } - - public int gatheredMinerals() { - return gatheredMinerals_native(pointer); - } - - public int gatheredGas() { - return gatheredGas_native(pointer); - } - - public int repairedMinerals() { - return repairedMinerals_native(pointer); - } - - public int repairedGas() { - return repairedGas_native(pointer); - } - - public int refundedMinerals() { - return refundedMinerals_native(pointer); - } - - public int refundedGas() { - return refundedGas_native(pointer); - } - - public int spentMinerals() { - return spentMinerals_native(pointer); - } - - public int spentGas() { - return spentGas_native(pointer); - } - - public int supplyTotal() { - return supplyTotal_native(pointer); - } - - public int supplyTotal(Race race) { - return supplyTotal_native(pointer, race); - } - - public int supplyUsed() { - return supplyUsed_native(pointer); - } - - public int supplyUsed(Race race) { - return supplyUsed_native(pointer, race); - } - - public int allUnitCount() { - return allUnitCount_native(pointer); - } - - public int allUnitCount(UnitType unit) { - return allUnitCount_native(pointer, unit); - } - - public int visibleUnitCount() { - return visibleUnitCount_native(pointer); - } - - public int visibleUnitCount(UnitType unit) { - return visibleUnitCount_native(pointer, unit); - } - - public int completedUnitCount() { - return completedUnitCount_native(pointer); - } - - public int completedUnitCount(UnitType unit) { - return completedUnitCount_native(pointer, unit); - } - - public int incompleteUnitCount() { - return incompleteUnitCount_native(pointer); - } - - public int incompleteUnitCount(UnitType unit) { - return incompleteUnitCount_native(pointer, unit); - } - - public int deadUnitCount() { - return deadUnitCount_native(pointer); - } - - public int deadUnitCount(UnitType unit) { - return deadUnitCount_native(pointer, unit); - } - - public int killedUnitCount() { - return killedUnitCount_native(pointer); - } - - public int killedUnitCount(UnitType unit) { - return killedUnitCount_native(pointer, unit); - } - - public int getUpgradeLevel(UpgradeType upgrade) { - return getUpgradeLevel_native(pointer, upgrade); - } - - public boolean hasResearched(TechType tech) { - return hasResearched_native(pointer, tech); - } - - public boolean isResearching(TechType tech) { - return isResearching_native(pointer, tech); - } - - public boolean isUpgrading(UpgradeType upgrade) { - return isUpgrading_native(pointer, upgrade); - } - - public Color getColor() { - return getColor_native(pointer); - } - - public char getTextColor() { - return getTextColor_native(pointer); - } - - public int maxEnergy(UnitType unit) { - return maxEnergy_native(pointer, unit); - } - - public double topSpeed(UnitType unit) { - return topSpeed_native(pointer, unit); - } - - public int weaponMaxRange(WeaponType weapon) { - return weaponMaxRange_native(pointer, weapon); - } - - public int sightRange(UnitType unit) { - return sightRange_native(pointer, unit); - } - - public int weaponDamageCooldown(UnitType unit) { - return weaponDamageCooldown_native(pointer, unit); - } - - public int armor(UnitType unit) { - return armor_native(pointer, unit); - } - - public int damage(WeaponType wpn) { - return damage_native(pointer, wpn); - } - - public int getUnitScore() { - return getUnitScore_native(pointer); - } - - public int getKillScore() { - return getKillScore_native(pointer); - } - - public int getBuildingScore() { - return getBuildingScore_native(pointer); - } - - public int getRazingScore() { - return getRazingScore_native(pointer); - } - - public int getCustomScore() { - return getCustomScore_native(pointer); - } - - public boolean isObserver() { - return isObserver_native(pointer); - } - - public int getMaxUpgradeLevel(UpgradeType upgrade) { - return getMaxUpgradeLevel_native(pointer, upgrade); - } - - public boolean isResearchAvailable(TechType tech) { - return isResearchAvailable_native(pointer, tech); - } - - public boolean isUnitAvailable(UnitType unit) { - return isUnitAvailable_native(pointer, unit); - } - - - private static Map instances = new HashMap(); - - private Player(long pointer) { - this.pointer = pointer; - } - - private static Player get(long pointer) { - if (pointer == 0 ) { - return null; - } - Player instance = instances.get(pointer); - if (instance == null ) { - instance = new Player(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native int getID_native(long pointer); - - private native String getName_native(long pointer); - - private native List getUnits_native(long pointer); - - private native Race getRace_native(long pointer); - - private native PlayerType getType_native(long pointer); - - private native Force getForce_native(long pointer); - - private native boolean isAlly_native(long pointer, Player player); - - private native boolean isEnemy_native(long pointer, Player player); - - private native boolean isNeutral_native(long pointer); - - private native TilePosition getStartLocation_native(long pointer); - - private native boolean isVictorious_native(long pointer); - - private native boolean isDefeated_native(long pointer); - - private native boolean leftGame_native(long pointer); - - private native int minerals_native(long pointer); - - private native int gas_native(long pointer); - - private native int gatheredMinerals_native(long pointer); - - private native int gatheredGas_native(long pointer); - - private native int repairedMinerals_native(long pointer); - - private native int repairedGas_native(long pointer); - - private native int refundedMinerals_native(long pointer); - - private native int refundedGas_native(long pointer); - - private native int spentMinerals_native(long pointer); - - private native int spentGas_native(long pointer); - - private native int supplyTotal_native(long pointer); - - private native int supplyTotal_native(long pointer, Race race); - - private native int supplyUsed_native(long pointer); - - private native int supplyUsed_native(long pointer, Race race); - - private native int allUnitCount_native(long pointer); - - private native int allUnitCount_native(long pointer, UnitType unit); - - private native int visibleUnitCount_native(long pointer); - - private native int visibleUnitCount_native(long pointer, UnitType unit); - - private native int completedUnitCount_native(long pointer); - - private native int completedUnitCount_native(long pointer, UnitType unit); - - private native int incompleteUnitCount_native(long pointer); - - private native int incompleteUnitCount_native(long pointer, UnitType unit); - - private native int deadUnitCount_native(long pointer); - - private native int deadUnitCount_native(long pointer, UnitType unit); - - private native int killedUnitCount_native(long pointer); - - private native int killedUnitCount_native(long pointer, UnitType unit); - - private native int getUpgradeLevel_native(long pointer, UpgradeType upgrade); - - private native boolean hasResearched_native(long pointer, TechType tech); - - private native boolean isResearching_native(long pointer, TechType tech); - - private native boolean isUpgrading_native(long pointer, UpgradeType upgrade); - - private native Color getColor_native(long pointer); - - private native char getTextColor_native(long pointer); - - private native int maxEnergy_native(long pointer, UnitType unit); - - private native double topSpeed_native(long pointer, UnitType unit); - - private native int weaponMaxRange_native(long pointer, WeaponType weapon); - - private native int sightRange_native(long pointer, UnitType unit); - - private native int weaponDamageCooldown_native(long pointer, UnitType unit); - - private native int armor_native(long pointer, UnitType unit); - - private native int damage_native(long pointer, WeaponType wpn); - - private native int getUnitScore_native(long pointer); - - private native int getKillScore_native(long pointer); - - private native int getBuildingScore_native(long pointer); - - private native int getRazingScore_native(long pointer); - - private native int getCustomScore_native(long pointer); - - private native boolean isObserver_native(long pointer); - - private native int getMaxUpgradeLevel_native(long pointer, UpgradeType upgrade); - - private native boolean isResearchAvailable_native(long pointer, TechType tech); - - private native boolean isUnitAvailable_native(long pointer, UnitType unit); - - -} diff --git a/bwapi4/PlayerType.java b/bwapi4/PlayerType.java deleted file mode 100644 index ef247f6..0000000 --- a/bwapi4/PlayerType.java +++ /dev/null @@ -1,74 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class PlayerType { - - public String toString() { - return toString_native(pointer); - } - - public boolean isLobbyType() { - return isLobbyType_native(pointer); - } - - public boolean isGameType() { - return isGameType_native(pointer); - } - - public static PlayerType None; - - public static PlayerType Computer; - - public static PlayerType Player; - - public static PlayerType RescuePassive; - - public static PlayerType EitherPreferComputer; - - public static PlayerType EitherPreferHuman; - - public static PlayerType Neutral; - - public static PlayerType Closed; - - public static PlayerType PlayerLeft; - - public static PlayerType ComputerLeft; - - public static PlayerType Unknown; - - - private static Map instances = new HashMap(); - - private PlayerType(long pointer) { - this.pointer = pointer; - } - - private static PlayerType get(long pointer) { - if (pointer == 0 ) { - return null; - } - PlayerType instance = instances.get(pointer); - if (instance == null ) { - instance = new PlayerType(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String toString_native(long pointer); - - private native boolean isLobbyType_native(long pointer); - - private native boolean isGameType_native(long pointer); - - -} diff --git a/bwapi4/Playerset.java b/bwapi4/Playerset.java deleted file mode 100644 index 3c3d885..0000000 --- a/bwapi4/Playerset.java +++ /dev/null @@ -1,58 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Playerset { - - public List getUnits() { - return getUnits_native(pointer); - } - - public void setAlliance(boolean allies) { - setAlliance_native(pointer, allies); - } - - public void setAlliance() { - setAlliance_native(pointer); - } - - public void setAlliance(boolean allies, boolean alliedVictory) { - setAlliance_native(pointer, allies, alliedVictory); - } - - - private static Map instances = new HashMap(); - - private Playerset(long pointer) { - this.pointer = pointer; - } - - private static Playerset get(long pointer) { - if (pointer == 0 ) { - return null; - } - Playerset instance = instances.get(pointer); - if (instance == null ) { - instance = new Playerset(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native List getUnits_native(long pointer); - - private native void setAlliance_native(long pointer, boolean allies); - - private native void setAlliance_native(long pointer); - - private native void setAlliance_native(long pointer, boolean allies, boolean alliedVictory); - - -} diff --git a/bwapi4/Point.java b/bwapi4/Point.java deleted file mode 100644 index ba76210..0000000 --- a/bwapi4/Point.java +++ /dev/null @@ -1,46 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Point { - - public boolean isValid() { - return isValid_native(pointer); - } - - public double getLength() { - return getLength_native(pointer); - } - - - private static Map instances = new HashMap(); - - private Point(long pointer) { - this.pointer = pointer; - } - - private static Point get(long pointer) { - if (pointer == 0 ) { - return null; - } - Point instance = instances.get(pointer); - if (instance == null ) { - instance = new Point(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native boolean isValid_native(long pointer); - - private native double getLength_native(long pointer); - - -} diff --git a/bwapi4/Position.java b/bwapi4/Position.java deleted file mode 100644 index b4efd8e..0000000 --- a/bwapi4/Position.java +++ /dev/null @@ -1,88 +0,0 @@ -package bwapi4; - -import java.lang.Override; -import java.util.HashMap; -import java.util.Map; - -/** - * Positions are measured in pixels and are the highest resolution. - */ -public class Position extends AbstractPoint{ - - private int x, y; - - public Position(int x, int y) { - this.x = x; - this.y = y; - } - - public String toString() { - return "[" + x + ", " + y + "]"; - } - - public native boolean isValid(); - - public native Position makeValid(); - - public native double getDistance(Position position); - - public native int getApproxDistance(Position position); - - public native double getLength(); - - public int getX() { - return x; - } - - public int getY() { - return y; - } - - public static Position Invalid; - - public static Position None; - - public static Position Unknown; - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof Position)) return false; - - Position position = (Position) o; - - if (x != position.x) return false; - if (y != position.y) return false; - - return true; - } - - @Override - public int hashCode() { - int result = x; - result = 31 * result + y; - return result; - } - - - private static Map instances = new HashMap(); - - private Position(long pointer) { - this.pointer = pointer; - } - - private static Position get(long pointer) { - Position instance = instances.get(pointer); - if (instance == null) { - instance = new Position(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - public Position getPoint(){ - return this; - } -} \ No newline at end of file diff --git a/bwapi4/PositionOrUnit.java b/bwapi4/PositionOrUnit.java deleted file mode 100644 index b371c13..0000000 --- a/bwapi4/PositionOrUnit.java +++ /dev/null @@ -1,55 +0,0 @@ -package bwapi4; - -import java.lang.IllegalArgumentException; -import java.lang.Object; -import java.lang.Override; - -public class PositionOrUnit { - - private Unit unit; - - private Position position; - - public PositionOrUnit(Unit unit){ - if(unit == null){ - throw new IllegalArgumentException("PositionOrUnit must not reference null!"); - }; - this.unit = unit; - } - - public PositionOrUnit(Position position){ - if(position == null){ - throw new IllegalArgumentException("PositionOrUnit must not reference null!"); - }; - this.position = position; - } - - public Unit getUnit(){ - return unit; - } - - public Position getPosition() { - return position; - } - - public boolean isUnit(){ - return unit != null; - } - - public boolean isPosition(){ - return position != null; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof PositionOrUnit)) return false; - - PositionOrUnit that = (PositionOrUnit) o; - - if (position != null ? !position.equals(that.position) : that.position != null) return false; - if (unit != null ? !unit.equals(that.unit) : that.unit != null) return false; - - return true; - } -} \ No newline at end of file diff --git a/bwapi4/PositionedObject.java b/bwapi4/PositionedObject.java deleted file mode 100644 index d739a6a..0000000 --- a/bwapi4/PositionedObject.java +++ /dev/null @@ -1,15 +0,0 @@ -package bwapi4; - -import bwapi4.Position; - -/** - * Interrmediate class used to translate getPoint() calls to getPosition() calls. - */ -public abstract class PositionedObject extends AbstractPoint { - - public Position getPoint(){ - return getPosition(); - } - - public abstract Position getPosition(); -} \ No newline at end of file diff --git a/bwapi4/Race.java b/bwapi4/Race.java deleted file mode 100644 index 578a3ae..0000000 --- a/bwapi4/Race.java +++ /dev/null @@ -1,82 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Race { - - public String toString() { - return toString_native(pointer); - } - - public UnitType getWorker() { - return getWorker_native(pointer); - } - - public UnitType getCenter() { - return getCenter_native(pointer); - } - - public UnitType getRefinery() { - return getRefinery_native(pointer); - } - - public UnitType getTransport() { - return getTransport_native(pointer); - } - - public UnitType getSupplyProvider() { - return getSupplyProvider_native(pointer); - } - - public static Race Zerg; - - public static Race Terran; - - public static Race Protoss; - - public static Race Random; - - public static Race None; - - public static Race Unknown; - - - private static Map instances = new HashMap(); - - private Race(long pointer) { - this.pointer = pointer; - } - - private static Race get(long pointer) { - if (pointer == 0 ) { - return null; - } - Race instance = instances.get(pointer); - if (instance == null ) { - instance = new Race(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String toString_native(long pointer); - - private native UnitType getWorker_native(long pointer); - - private native UnitType getCenter_native(long pointer); - - private native UnitType getRefinery_native(long pointer); - - private native UnitType getTransport_native(long pointer); - - private native UnitType getSupplyProvider_native(long pointer); - - -} diff --git a/bwapi4/Region.java b/bwapi4/Region.java deleted file mode 100644 index ecda2f3..0000000 --- a/bwapi4/Region.java +++ /dev/null @@ -1,120 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; -import bwapi4.CenteredObject; - -public class Region extends CenteredObject -{ - - public int getID() { - return getID_native(pointer); - } - - public int getRegionGroupID() { - return getRegionGroupID_native(pointer); - } - - public Position getCenter() { - return getCenter_native(pointer); - } - - public boolean isHigherGround() { - return isHigherGround_native(pointer); - } - - public int getDefensePriority() { - return getDefensePriority_native(pointer); - } - - public boolean isAccessible() { - return isAccessible_native(pointer); - } - - public List getNeighbors() { - return getNeighbors_native(pointer); - } - - public int getBoundsLeft() { - return getBoundsLeft_native(pointer); - } - - public int getBoundsTop() { - return getBoundsTop_native(pointer); - } - - public int getBoundsRight() { - return getBoundsRight_native(pointer); - } - - public int getBoundsBottom() { - return getBoundsBottom_native(pointer); - } - - public Region getClosestAccessibleRegion() { - return getClosestAccessibleRegion_native(pointer); - } - - public Region getClosestInaccessibleRegion() { - return getClosestInaccessibleRegion_native(pointer); - } - - public int getDistance(Region other) { - return getDistance_native(pointer, other); - } - - - private static Map instances = new HashMap(); - - private Region(long pointer) { - this.pointer = pointer; - } - - private static Region get(long pointer) { - if (pointer == 0 ) { - return null; - } - Region instance = instances.get(pointer); - if (instance == null ) { - instance = new Region(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native int getID_native(long pointer); - - private native int getRegionGroupID_native(long pointer); - - private native Position getCenter_native(long pointer); - - private native boolean isHigherGround_native(long pointer); - - private native int getDefensePriority_native(long pointer); - - private native boolean isAccessible_native(long pointer); - - private native List getNeighbors_native(long pointer); - - private native int getBoundsLeft_native(long pointer); - - private native int getBoundsTop_native(long pointer); - - private native int getBoundsRight_native(long pointer); - - private native int getBoundsBottom_native(long pointer); - - private native Region getClosestAccessibleRegion_native(long pointer); - - private native Region getClosestInaccessibleRegion_native(long pointer); - - private native int getDistance_native(long pointer, Region other); - - -} diff --git a/bwapi4/Regionset.java b/bwapi4/Regionset.java deleted file mode 100644 index 574730c..0000000 --- a/bwapi4/Regionset.java +++ /dev/null @@ -1,40 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Regionset { - - public Position getCenter() { - return getCenter_native(pointer); - } - - - private static Map instances = new HashMap(); - - private Regionset(long pointer) { - this.pointer = pointer; - } - - private static Regionset get(long pointer) { - if (pointer == 0 ) { - return null; - } - Regionset instance = instances.get(pointer); - if (instance == null ) { - instance = new Regionset(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native Position getCenter_native(long pointer); - - -} diff --git a/bwapi4/ShapeType/Enum.java b/bwapi4/ShapeType/Enum.java deleted file mode 100644 index 9118876..0000000 --- a/bwapi4/ShapeType/Enum.java +++ /dev/null @@ -1,30 +0,0 @@ -package bwapi4.ShapeType; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public enum Enum { - - None(0), - Text(1), - Box(2), - Triangle(3), - Circle(4), - Ellipse(5), - Dot(6); - - private int value; - - public int getValue(){ - return value; - } - - Enum(int value){ - this.value = value; - } - -} diff --git a/bwapi4/TechType.java b/bwapi4/TechType.java deleted file mode 100644 index 8cff9e5..0000000 --- a/bwapi4/TechType.java +++ /dev/null @@ -1,172 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class TechType { - - public String toString() { - return toString_native(pointer); - } - - public Race getRace() { - return getRace_native(pointer); - } - - public int mineralPrice() { - return mineralPrice_native(pointer); - } - - public int gasPrice() { - return gasPrice_native(pointer); - } - - public int researchTime() { - return researchTime_native(pointer); - } - - public int energyCost() { - return energyCost_native(pointer); - } - - public UnitType whatResearches() { - return whatResearches_native(pointer); - } - - public WeaponType getWeapon() { - return getWeapon_native(pointer); - } - - public boolean targetsUnit() { - return targetsUnit_native(pointer); - } - - public boolean targetsPosition() { - return targetsPosition_native(pointer); - } - - public Order getOrder() { - return getOrder_native(pointer); - } - - public static TechType Stim_Packs; - - public static TechType Lockdown; - - public static TechType EMP_Shockwave; - - public static TechType Spider_Mines; - - public static TechType Scanner_Sweep; - - public static TechType Tank_Siege_Mode; - - public static TechType Defensive_Matrix; - - public static TechType Irradiate; - - public static TechType Yamato_Gun; - - public static TechType Cloaking_Field; - - public static TechType Personnel_Cloaking; - - public static TechType Burrowing; - - public static TechType Infestation; - - public static TechType Spawn_Broodlings; - - public static TechType Dark_Swarm; - - public static TechType Plague; - - public static TechType Consume; - - public static TechType Ensnare; - - public static TechType Parasite; - - public static TechType Psionic_Storm; - - public static TechType Hallucination; - - public static TechType Recall; - - public static TechType Stasis_Field; - - public static TechType Archon_Warp; - - public static TechType Restoration; - - public static TechType Disruption_Web; - - public static TechType Mind_Control; - - public static TechType Dark_Archon_Meld; - - public static TechType Feedback; - - public static TechType Optical_Flare; - - public static TechType Maelstrom; - - public static TechType Lurker_Aspect; - - public static TechType Healing; - - public static TechType None; - - public static TechType Nuclear_Strike; - - public static TechType Unknown; - - - private static Map instances = new HashMap(); - - private TechType(long pointer) { - this.pointer = pointer; - } - - private static TechType get(long pointer) { - if (pointer == 0 ) { - return null; - } - TechType instance = instances.get(pointer); - if (instance == null ) { - instance = new TechType(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String toString_native(long pointer); - - private native Race getRace_native(long pointer); - - private native int mineralPrice_native(long pointer); - - private native int gasPrice_native(long pointer); - - private native int researchTime_native(long pointer); - - private native int energyCost_native(long pointer); - - private native UnitType whatResearches_native(long pointer); - - private native WeaponType getWeapon_native(long pointer); - - private native boolean targetsUnit_native(long pointer); - - private native boolean targetsPosition_native(long pointer); - - private native Order getOrder_native(long pointer); - - -} diff --git a/bwapi4/Text/Enum.java b/bwapi4/Text/Enum.java deleted file mode 100644 index 8eee27e..0000000 --- a/bwapi4/Text/Enum.java +++ /dev/null @@ -1,49 +0,0 @@ -package bwapi4.Text; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public enum Enum { - - Previous(1), - Default(2), - Yellow(3), - White(4), - Grey(5), - Red(6), - Green(7), - BrightRed(8), - Invisible(11), - Blue(14), - Teal(15), - Purple(16), - Orange(17), - Align_Right(18), - Align_Center(19), - Invisible2(20), - Brown(21), - PlayerWhite(22), - PlayerYellow(23), - DarkGreen(24), - LightYellow(25), - Cyan(26), - Tan(27), - GreyBlue(28), - GreyGreen(29), - GreyCyan(30); - - private int value; - - public int getValue(){ - return value; - } - - Enum(int value){ - this.value = value; - } - -} diff --git a/bwapi4/Text/Size/Enum.java b/bwapi4/Text/Size/Enum.java deleted file mode 100644 index 85e1db4..0000000 --- a/bwapi4/Text/Size/Enum.java +++ /dev/null @@ -1,26 +0,0 @@ -package bwapi4.Text.Size; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public enum Enum { - - Small(0), - Default(1), - Large(2); - - private int value; - - public int getValue(){ - return value; - } - - Enum(int value){ - this.value = value; - } - -} diff --git a/bwapi4/TilePosition.java b/bwapi4/TilePosition.java deleted file mode 100644 index 711ee06..0000000 --- a/bwapi4/TilePosition.java +++ /dev/null @@ -1,87 +0,0 @@ -package bwapi4; - -import java.lang.Override; -import java.util.HashMap; -import java.util.Map; - -/** - * Build Tiles - each build tile is a 4x4 square of walk tiles, or a 32x32 square of pixels. - * These are called build tiles because buildability data is available at this resolution, and correspond to the tiles seen in game. - * For example, a Command Center occupies an area of 4x3 build tiles. - */ -public class TilePosition extends AbstractPoint{ - private int x, y; - - public TilePosition(int x, int y) { - this.x = x; - this.y = y; - } - - public String toString() { - return "[" + x + ", " + y + "]"; - } - - public native boolean isValid(); - - public native TilePosition makeValid(); - - public native double getDistance(TilePosition position); - - public native double getLength(); - - public int getX() { - return x; - } - - public int getY() { - return y; - } - - public static TilePosition Invalid; - - public static TilePosition None; - - public static TilePosition Unknown; - - private static Map instances = new HashMap(); - - private TilePosition(long pointer) { - this.pointer = pointer; - } - - private static TilePosition get(long pointer) { - TilePosition instance = instances.get(pointer); - if (instance == null) { - instance = new TilePosition(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof TilePosition)) return false; - - TilePosition that = (TilePosition) o; - - if (x != that.x) return false; - if (y != that.y) return false; - - return true; - } - - @Override - public int hashCode() { - int result = x; - result = 31 * result + y; - return result; - } - - public TilePosition getPoint(){ - return this; - } -} \ No newline at end of file diff --git a/bwapi4/Tournament/ActionID.java b/bwapi4/Tournament/ActionID.java deleted file mode 100644 index a6a1c2c..0000000 --- a/bwapi4/Tournament/ActionID.java +++ /dev/null @@ -1,35 +0,0 @@ -package bwapi4.Tournament; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public enum ActionID { - - EnableFlag(0), - PauseGame(1), - ResumeGame(2), - LeaveGame(3), - SetLocalSpeed(4), - SetTextSize(5), - SetLatCom(6), - SetGUI(7), - SetMap(8), - SetFrameSkip(9), - Printf(10), - SendText(11); - - private int value; - - public int getValue(){ - return value; - } - - ActionID(int value){ - this.value = value; - } - -} diff --git a/bwapi4/UnaryFilter.java b/bwapi4/UnaryFilter.java deleted file mode 100644 index d3848f6..0000000 --- a/bwapi4/UnaryFilter.java +++ /dev/null @@ -1,34 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class UnaryFilter { - - - private static Map instances = new HashMap(); - - private UnaryFilter(long pointer) { - this.pointer = pointer; - } - - private static UnaryFilter get(long pointer) { - if (pointer == 0 ) { - return null; - } - UnaryFilter instance = instances.get(pointer); - if (instance == null ) { - instance = new UnaryFilter(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - -} diff --git a/bwapi4/Unit.java b/bwapi4/Unit.java deleted file mode 100644 index 3cb2e35..0000000 --- a/bwapi4/Unit.java +++ /dev/null @@ -1,2760 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; -import bwapi4.PositionedObject; - -public class Unit extends PositionedObject -{ - - public int getID() { - return getID_native(pointer); - } - - public boolean exists() { - return exists_native(pointer); - } - - public int getReplayID() { - return getReplayID_native(pointer); - } - - public Player getPlayer() { - return getPlayer_native(pointer); - } - - public UnitType getType() { - return getType_native(pointer); - } - - public Position getPosition() { - return getPosition_native(pointer); - } - - public TilePosition getTilePosition() { - return getTilePosition_native(pointer); - } - - public double getAngle() { - return getAngle_native(pointer); - } - - public double getVelocityX() { - return getVelocityX_native(pointer); - } - - public double getVelocityY() { - return getVelocityY_native(pointer); - } - - public Region getRegion() { - return getRegion_native(pointer); - } - - public int getLeft() { - return getLeft_native(pointer); - } - - public int getTop() { - return getTop_native(pointer); - } - - public int getRight() { - return getRight_native(pointer); - } - - public int getBottom() { - return getBottom_native(pointer); - } - - public int getHitPoints() { - return getHitPoints_native(pointer); - } - - public int getShields() { - return getShields_native(pointer); - } - - public int getEnergy() { - return getEnergy_native(pointer); - } - - public int getResources() { - return getResources_native(pointer); - } - - public int getResourceGroup() { - return getResourceGroup_native(pointer); - } - - public int getDistance(PositionOrUnit target) { - return getDistance_native(pointer, target); - } - - public boolean hasPath(PositionOrUnit target) { - return hasPath_native(pointer, target); - } - - public int getLastCommandFrame() { - return getLastCommandFrame_native(pointer); - } - - public UnitCommand getLastCommand() { - return getLastCommand_native(pointer); - } - - public Player getLastAttackingPlayer() { - return getLastAttackingPlayer_native(pointer); - } - - public UnitType getInitialType() { - return getInitialType_native(pointer); - } - - public Position getInitialPosition() { - return getInitialPosition_native(pointer); - } - - public TilePosition getInitialTilePosition() { - return getInitialTilePosition_native(pointer); - } - - public int getInitialHitPoints() { - return getInitialHitPoints_native(pointer); - } - - public int getInitialResources() { - return getInitialResources_native(pointer); - } - - public int getKillCount() { - return getKillCount_native(pointer); - } - - public int getAcidSporeCount() { - return getAcidSporeCount_native(pointer); - } - - public int getInterceptorCount() { - return getInterceptorCount_native(pointer); - } - - public int getScarabCount() { - return getScarabCount_native(pointer); - } - - public int getSpiderMineCount() { - return getSpiderMineCount_native(pointer); - } - - public int getGroundWeaponCooldown() { - return getGroundWeaponCooldown_native(pointer); - } - - public int getAirWeaponCooldown() { - return getAirWeaponCooldown_native(pointer); - } - - public int getSpellCooldown() { - return getSpellCooldown_native(pointer); - } - - public int getDefenseMatrixPoints() { - return getDefenseMatrixPoints_native(pointer); - } - - public int getDefenseMatrixTimer() { - return getDefenseMatrixTimer_native(pointer); - } - - public int getEnsnareTimer() { - return getEnsnareTimer_native(pointer); - } - - public int getIrradiateTimer() { - return getIrradiateTimer_native(pointer); - } - - public int getLockdownTimer() { - return getLockdownTimer_native(pointer); - } - - public int getMaelstromTimer() { - return getMaelstromTimer_native(pointer); - } - - public int getOrderTimer() { - return getOrderTimer_native(pointer); - } - - public int getPlagueTimer() { - return getPlagueTimer_native(pointer); - } - - public int getRemoveTimer() { - return getRemoveTimer_native(pointer); - } - - public int getStasisTimer() { - return getStasisTimer_native(pointer); - } - - public int getStimTimer() { - return getStimTimer_native(pointer); - } - - public UnitType getBuildType() { - return getBuildType_native(pointer); - } - - public TechType getTech() { - return getTech_native(pointer); - } - - public UpgradeType getUpgrade() { - return getUpgrade_native(pointer); - } - - public int getRemainingBuildTime() { - return getRemainingBuildTime_native(pointer); - } - - public int getRemainingTrainTime() { - return getRemainingTrainTime_native(pointer); - } - - public int getRemainingResearchTime() { - return getRemainingResearchTime_native(pointer); - } - - public int getRemainingUpgradeTime() { - return getRemainingUpgradeTime_native(pointer); - } - - public Unit getBuildUnit() { - return getBuildUnit_native(pointer); - } - - public Unit getTarget() { - return getTarget_native(pointer); - } - - public Position getTargetPosition() { - return getTargetPosition_native(pointer); - } - - public Order getOrder() { - return getOrder_native(pointer); - } - - public Order getSecondaryOrder() { - return getSecondaryOrder_native(pointer); - } - - public Unit getOrderTarget() { - return getOrderTarget_native(pointer); - } - - public Position getOrderTargetPosition() { - return getOrderTargetPosition_native(pointer); - } - - public Position getRallyPosition() { - return getRallyPosition_native(pointer); - } - - public Unit getRallyUnit() { - return getRallyUnit_native(pointer); - } - - public Unit getAddon() { - return getAddon_native(pointer); - } - - public Unit getNydusExit() { - return getNydusExit_native(pointer); - } - - public Unit getPowerUp() { - return getPowerUp_native(pointer); - } - - public Unit getTransport() { - return getTransport_native(pointer); - } - - public List getLoadedUnits() { - return getLoadedUnits_native(pointer); - } - - public int getSpaceRemaining() { - return getSpaceRemaining_native(pointer); - } - - public Unit getCarrier() { - return getCarrier_native(pointer); - } - - public List getInterceptors() { - return getInterceptors_native(pointer); - } - - public Unit getHatchery() { - return getHatchery_native(pointer); - } - - public List getLarva() { - return getLarva_native(pointer); - } - - public boolean hasNuke() { - return hasNuke_native(pointer); - } - - public boolean isAccelerating() { - return isAccelerating_native(pointer); - } - - public boolean isAttacking() { - return isAttacking_native(pointer); - } - - public boolean isAttackFrame() { - return isAttackFrame_native(pointer); - } - - public boolean isBeingConstructed() { - return isBeingConstructed_native(pointer); - } - - public boolean isBeingGathered() { - return isBeingGathered_native(pointer); - } - - public boolean isBeingHealed() { - return isBeingHealed_native(pointer); - } - - public boolean isBlind() { - return isBlind_native(pointer); - } - - public boolean isBraking() { - return isBraking_native(pointer); - } - - public boolean isBurrowed() { - return isBurrowed_native(pointer); - } - - public boolean isCarryingGas() { - return isCarryingGas_native(pointer); - } - - public boolean isCarryingMinerals() { - return isCarryingMinerals_native(pointer); - } - - public boolean isCloaked() { - return isCloaked_native(pointer); - } - - public boolean isCompleted() { - return isCompleted_native(pointer); - } - - public boolean isConstructing() { - return isConstructing_native(pointer); - } - - public boolean isDefenseMatrixed() { - return isDefenseMatrixed_native(pointer); - } - - public boolean isDetected() { - return isDetected_native(pointer); - } - - public boolean isEnsnared() { - return isEnsnared_native(pointer); - } - - public boolean isFlying() { - return isFlying_native(pointer); - } - - public boolean isFollowing() { - return isFollowing_native(pointer); - } - - public boolean isGatheringGas() { - return isGatheringGas_native(pointer); - } - - public boolean isGatheringMinerals() { - return isGatheringMinerals_native(pointer); - } - - public boolean isHallucination() { - return isHallucination_native(pointer); - } - - public boolean isHoldingPosition() { - return isHoldingPosition_native(pointer); - } - - public boolean isIdle() { - return isIdle_native(pointer); - } - - public boolean isInterruptible() { - return isInterruptible_native(pointer); - } - - public boolean isInvincible() { - return isInvincible_native(pointer); - } - - public boolean isInWeaponRange(Unit target) { - return isInWeaponRange_native(pointer, target); - } - - public boolean isIrradiated() { - return isIrradiated_native(pointer); - } - - public boolean isLifted() { - return isLifted_native(pointer); - } - - public boolean isLoaded() { - return isLoaded_native(pointer); - } - - public boolean isLockedDown() { - return isLockedDown_native(pointer); - } - - public boolean isMaelstrommed() { - return isMaelstrommed_native(pointer); - } - - public boolean isMorphing() { - return isMorphing_native(pointer); - } - - public boolean isMoving() { - return isMoving_native(pointer); - } - - public boolean isParasited() { - return isParasited_native(pointer); - } - - public boolean isPatrolling() { - return isPatrolling_native(pointer); - } - - public boolean isPlagued() { - return isPlagued_native(pointer); - } - - public boolean isRepairing() { - return isRepairing_native(pointer); - } - - public boolean isResearching() { - return isResearching_native(pointer); - } - - public boolean isSelected() { - return isSelected_native(pointer); - } - - public boolean isSieged() { - return isSieged_native(pointer); - } - - public boolean isStartingAttack() { - return isStartingAttack_native(pointer); - } - - public boolean isStasised() { - return isStasised_native(pointer); - } - - public boolean isStimmed() { - return isStimmed_native(pointer); - } - - public boolean isStuck() { - return isStuck_native(pointer); - } - - public boolean isTraining() { - return isTraining_native(pointer); - } - - public boolean isUnderAttack() { - return isUnderAttack_native(pointer); - } - - public boolean isUnderDarkSwarm() { - return isUnderDarkSwarm_native(pointer); - } - - public boolean isUnderDisruptionWeb() { - return isUnderDisruptionWeb_native(pointer); - } - - public boolean isUnderStorm() { - return isUnderStorm_native(pointer); - } - - public boolean isPowered() { - return isPowered_native(pointer); - } - - public boolean isUpgrading() { - return isUpgrading_native(pointer); - } - - public boolean isVisible() { - return isVisible_native(pointer); - } - - public boolean isVisible(Player player) { - return isVisible_native(pointer, player); - } - - public boolean isTargetable() { - return isTargetable_native(pointer); - } - - public boolean issueCommand(UnitCommand command) { - return issueCommand_native(pointer, command); - } - - public boolean attack(PositionOrUnit target) { - return attack_native(pointer, target); - } - - public boolean attack(PositionOrUnit target, boolean shiftQueueCommand) { - return attack_native(pointer, target, shiftQueueCommand); - } - - public boolean build(UnitType type) { - return build_native(pointer, type); - } - - public boolean build(UnitType type, TilePosition target) { - return build_native(pointer, type, target); - } - - public boolean buildAddon(UnitType type) { - return buildAddon_native(pointer, type); - } - - public boolean train() { - return train_native(pointer); - } - - public boolean train(UnitType type) { - return train_native(pointer, type); - } - - public boolean morph(UnitType type) { - return morph_native(pointer, type); - } - - public boolean research(TechType tech) { - return research_native(pointer, tech); - } - - public boolean upgrade(UpgradeType upgrade) { - return upgrade_native(pointer, upgrade); - } - - public boolean setRallyPoint(PositionOrUnit target) { - return setRallyPoint_native(pointer, target); - } - - public boolean move(Position target) { - return move_native(pointer, target); - } - - public boolean move(Position target, boolean shiftQueueCommand) { - return move_native(pointer, target, shiftQueueCommand); - } - - public boolean patrol(Position target) { - return patrol_native(pointer, target); - } - - public boolean patrol(Position target, boolean shiftQueueCommand) { - return patrol_native(pointer, target, shiftQueueCommand); - } - - public boolean holdPosition() { - return holdPosition_native(pointer); - } - - public boolean holdPosition(boolean shiftQueueCommand) { - return holdPosition_native(pointer, shiftQueueCommand); - } - - public boolean stop() { - return stop_native(pointer); - } - - public boolean stop(boolean shiftQueueCommand) { - return stop_native(pointer, shiftQueueCommand); - } - - public boolean follow(Unit target) { - return follow_native(pointer, target); - } - - public boolean follow(Unit target, boolean shiftQueueCommand) { - return follow_native(pointer, target, shiftQueueCommand); - } - - public boolean gather(Unit target) { - return gather_native(pointer, target); - } - - public boolean gather(Unit target, boolean shiftQueueCommand) { - return gather_native(pointer, target, shiftQueueCommand); - } - - public boolean returnCargo() { - return returnCargo_native(pointer); - } - - public boolean returnCargo(boolean shiftQueueCommand) { - return returnCargo_native(pointer, shiftQueueCommand); - } - - public boolean repair(Unit target) { - return repair_native(pointer, target); - } - - public boolean repair(Unit target, boolean shiftQueueCommand) { - return repair_native(pointer, target, shiftQueueCommand); - } - - public boolean burrow() { - return burrow_native(pointer); - } - - public boolean unburrow() { - return unburrow_native(pointer); - } - - public boolean cloak() { - return cloak_native(pointer); - } - - public boolean decloak() { - return decloak_native(pointer); - } - - public boolean siege() { - return siege_native(pointer); - } - - public boolean unsiege() { - return unsiege_native(pointer); - } - - public boolean lift() { - return lift_native(pointer); - } - - public boolean land(TilePosition target) { - return land_native(pointer, target); - } - - public boolean load(Unit target) { - return load_native(pointer, target); - } - - public boolean load(Unit target, boolean shiftQueueCommand) { - return load_native(pointer, target, shiftQueueCommand); - } - - public boolean unload(Unit target) { - return unload_native(pointer, target); - } - - public boolean unloadAll() { - return unloadAll_native(pointer); - } - - public boolean unloadAll(boolean shiftQueueCommand) { - return unloadAll_native(pointer, shiftQueueCommand); - } - - public boolean unloadAll(Position target) { - return unloadAll_native(pointer, target); - } - - public boolean unloadAll(Position target, boolean shiftQueueCommand) { - return unloadAll_native(pointer, target, shiftQueueCommand); - } - - public boolean rightClick(PositionOrUnit target) { - return rightClick_native(pointer, target); - } - - public boolean rightClick(PositionOrUnit target, boolean shiftQueueCommand) { - return rightClick_native(pointer, target, shiftQueueCommand); - } - - public boolean haltConstruction() { - return haltConstruction_native(pointer); - } - - public boolean cancelConstruction() { - return cancelConstruction_native(pointer); - } - - public boolean cancelAddon() { - return cancelAddon_native(pointer); - } - - public boolean cancelTrain() { - return cancelTrain_native(pointer); - } - - public boolean cancelTrain(int slot) { - return cancelTrain_native(pointer, slot); - } - - public boolean cancelMorph() { - return cancelMorph_native(pointer); - } - - public boolean cancelResearch() { - return cancelResearch_native(pointer); - } - - public boolean cancelUpgrade() { - return cancelUpgrade_native(pointer); - } - - public boolean useTech(TechType tech) { - return useTech_native(pointer, tech); - } - - public boolean useTech(TechType tech, PositionOrUnit target) { - return useTech_native(pointer, tech, target); - } - - public boolean placeCOP(TilePosition target) { - return placeCOP_native(pointer, target); - } - - public boolean canIssueCommand(UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanBuildUnitType, boolean checkCanTargetUnit, boolean checkCanIssueCommandType) { - return canIssueCommand_native(pointer, command, checkCanUseTechPositionOnPositions, checkCanUseTechUnitOnUnits, checkCanBuildUnitType, checkCanTargetUnit, checkCanIssueCommandType); - } - - public boolean canIssueCommand(UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanBuildUnitType, boolean checkCanTargetUnit) { - return canIssueCommand_native(pointer, command, checkCanUseTechPositionOnPositions, checkCanUseTechUnitOnUnits, checkCanBuildUnitType, checkCanTargetUnit); - } - - public boolean canIssueCommand(UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanBuildUnitType) { - return canIssueCommand_native(pointer, command, checkCanUseTechPositionOnPositions, checkCanUseTechUnitOnUnits, checkCanBuildUnitType); - } - - public boolean canIssueCommand(UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits) { - return canIssueCommand_native(pointer, command, checkCanUseTechPositionOnPositions, checkCanUseTechUnitOnUnits); - } - - public boolean canIssueCommand(UnitCommand command, boolean checkCanUseTechPositionOnPositions) { - return canIssueCommand_native(pointer, command, checkCanUseTechPositionOnPositions); - } - - public boolean canIssueCommand(UnitCommand command) { - return canIssueCommand_native(pointer, command); - } - - public boolean canIssueCommand(UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanBuildUnitType, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canIssueCommand_native(pointer, command, checkCanUseTechPositionOnPositions, checkCanUseTechUnitOnUnits, checkCanBuildUnitType, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canIssueCommandGrouped(UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped) { - return canIssueCommandGrouped_native(pointer, command, checkCanUseTechPositionOnPositions, checkCanUseTechUnitOnUnits, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibilityGrouped); - } - - public boolean canIssueCommandGrouped(UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanTargetUnit, boolean checkCanIssueCommandType) { - return canIssueCommandGrouped_native(pointer, command, checkCanUseTechPositionOnPositions, checkCanUseTechUnitOnUnits, checkCanTargetUnit, checkCanIssueCommandType); - } - - public boolean canIssueCommandGrouped(UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanTargetUnit) { - return canIssueCommandGrouped_native(pointer, command, checkCanUseTechPositionOnPositions, checkCanUseTechUnitOnUnits, checkCanTargetUnit); - } - - public boolean canIssueCommandGrouped(UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits) { - return canIssueCommandGrouped_native(pointer, command, checkCanUseTechPositionOnPositions, checkCanUseTechUnitOnUnits); - } - - public boolean canIssueCommandGrouped(UnitCommand command, boolean checkCanUseTechPositionOnPositions) { - return canIssueCommandGrouped_native(pointer, command, checkCanUseTechPositionOnPositions); - } - - public boolean canIssueCommandGrouped(UnitCommand command) { - return canIssueCommandGrouped_native(pointer, command); - } - - public boolean canIssueCommandGrouped(UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped, boolean checkCommandibility) { - return canIssueCommandGrouped_native(pointer, command, checkCanUseTechPositionOnPositions, checkCanUseTechUnitOnUnits, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibilityGrouped, checkCommandibility); - } - - public boolean canCommand() { - return canCommand_native(pointer); - } - - public boolean canCommandGrouped() { - return canCommandGrouped_native(pointer); - } - - public boolean canCommandGrouped(boolean checkCommandibility) { - return canCommandGrouped_native(pointer, checkCommandibility); - } - - public boolean canIssueCommandType(UnitCommandType ct) { - return canIssueCommandType_native(pointer, ct); - } - - public boolean canIssueCommandType(UnitCommandType ct, boolean checkCommandibility) { - return canIssueCommandType_native(pointer, ct, checkCommandibility); - } - - public boolean canIssueCommandTypeGrouped(UnitCommandType ct, boolean checkCommandibilityGrouped) { - return canIssueCommandTypeGrouped_native(pointer, ct, checkCommandibilityGrouped); - } - - public boolean canIssueCommandTypeGrouped(UnitCommandType ct) { - return canIssueCommandTypeGrouped_native(pointer, ct); - } - - public boolean canIssueCommandTypeGrouped(UnitCommandType ct, boolean checkCommandibilityGrouped, boolean checkCommandibility) { - return canIssueCommandTypeGrouped_native(pointer, ct, checkCommandibilityGrouped, checkCommandibility); - } - - public boolean canTargetUnit(Unit targetUnit) { - return canTargetUnit_native(pointer, targetUnit); - } - - public boolean canTargetUnit(Unit targetUnit, boolean checkCommandibility) { - return canTargetUnit_native(pointer, targetUnit, checkCommandibility); - } - - public boolean canAttack() { - return canAttack_native(pointer); - } - - public boolean canAttack(boolean checkCommandibility) { - return canAttack_native(pointer, checkCommandibility); - } - - public boolean canAttack(PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType) { - return canAttack_native(pointer, target, checkCanTargetUnit, checkCanIssueCommandType); - } - - public boolean canAttack(PositionOrUnit target, boolean checkCanTargetUnit) { - return canAttack_native(pointer, target, checkCanTargetUnit); - } - - public boolean canAttack(PositionOrUnit target) { - return canAttack_native(pointer, target); - } - - public boolean canAttack(PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canAttack_native(pointer, target, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canAttackGrouped(boolean checkCommandibilityGrouped) { - return canAttackGrouped_native(pointer, checkCommandibilityGrouped); - } - - public boolean canAttackGrouped() { - return canAttackGrouped_native(pointer); - } - - public boolean canAttackGrouped(boolean checkCommandibilityGrouped, boolean checkCommandibility) { - return canAttackGrouped_native(pointer, checkCommandibilityGrouped, checkCommandibility); - } - - public boolean canAttackGrouped(PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped) { - return canAttackGrouped_native(pointer, target, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibilityGrouped); - } - - public boolean canAttackGrouped(PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType) { - return canAttackGrouped_native(pointer, target, checkCanTargetUnit, checkCanIssueCommandType); - } - - public boolean canAttackGrouped(PositionOrUnit target, boolean checkCanTargetUnit) { - return canAttackGrouped_native(pointer, target, checkCanTargetUnit); - } - - public boolean canAttackGrouped(PositionOrUnit target) { - return canAttackGrouped_native(pointer, target); - } - - public boolean canAttackGrouped(PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped, boolean checkCommandibility) { - return canAttackGrouped_native(pointer, target, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibilityGrouped, checkCommandibility); - } - - public boolean canAttackMove() { - return canAttackMove_native(pointer); - } - - public boolean canAttackMove(boolean checkCommandibility) { - return canAttackMove_native(pointer, checkCommandibility); - } - - public boolean canAttackMoveGrouped(boolean checkCommandibilityGrouped) { - return canAttackMoveGrouped_native(pointer, checkCommandibilityGrouped); - } - - public boolean canAttackMoveGrouped() { - return canAttackMoveGrouped_native(pointer); - } - - public boolean canAttackMoveGrouped(boolean checkCommandibilityGrouped, boolean checkCommandibility) { - return canAttackMoveGrouped_native(pointer, checkCommandibilityGrouped, checkCommandibility); - } - - public boolean canAttackUnit() { - return canAttackUnit_native(pointer); - } - - public boolean canAttackUnit(boolean checkCommandibility) { - return canAttackUnit_native(pointer, checkCommandibility); - } - - public boolean canAttackUnit(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType) { - return canAttackUnit_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType); - } - - public boolean canAttackUnit(Unit targetUnit, boolean checkCanTargetUnit) { - return canAttackUnit_native(pointer, targetUnit, checkCanTargetUnit); - } - - public boolean canAttackUnit(Unit targetUnit) { - return canAttackUnit_native(pointer, targetUnit); - } - - public boolean canAttackUnit(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canAttackUnit_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canAttackUnitGrouped(boolean checkCommandibilityGrouped) { - return canAttackUnitGrouped_native(pointer, checkCommandibilityGrouped); - } - - public boolean canAttackUnitGrouped() { - return canAttackUnitGrouped_native(pointer); - } - - public boolean canAttackUnitGrouped(boolean checkCommandibilityGrouped, boolean checkCommandibility) { - return canAttackUnitGrouped_native(pointer, checkCommandibilityGrouped, checkCommandibility); - } - - public boolean canAttackUnitGrouped(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped) { - return canAttackUnitGrouped_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibilityGrouped); - } - - public boolean canAttackUnitGrouped(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType) { - return canAttackUnitGrouped_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType); - } - - public boolean canAttackUnitGrouped(Unit targetUnit, boolean checkCanTargetUnit) { - return canAttackUnitGrouped_native(pointer, targetUnit, checkCanTargetUnit); - } - - public boolean canAttackUnitGrouped(Unit targetUnit) { - return canAttackUnitGrouped_native(pointer, targetUnit); - } - - public boolean canAttackUnitGrouped(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped, boolean checkCommandibility) { - return canAttackUnitGrouped_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibilityGrouped, checkCommandibility); - } - - public boolean canBuild() { - return canBuild_native(pointer); - } - - public boolean canBuild(boolean checkCommandibility) { - return canBuild_native(pointer, checkCommandibility); - } - - public boolean canBuild(UnitType uType, boolean checkCanIssueCommandType) { - return canBuild_native(pointer, uType, checkCanIssueCommandType); - } - - public boolean canBuild(UnitType uType) { - return canBuild_native(pointer, uType); - } - - public boolean canBuild(UnitType uType, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canBuild_native(pointer, uType, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canBuild(UnitType uType, TilePosition tilePos, boolean checkTargetUnitType, boolean checkCanIssueCommandType) { - return canBuild_native(pointer, uType, tilePos, checkTargetUnitType, checkCanIssueCommandType); - } - - public boolean canBuild(UnitType uType, TilePosition tilePos, boolean checkTargetUnitType) { - return canBuild_native(pointer, uType, tilePos, checkTargetUnitType); - } - - public boolean canBuild(UnitType uType, TilePosition tilePos) { - return canBuild_native(pointer, uType, tilePos); - } - - public boolean canBuild(UnitType uType, TilePosition tilePos, boolean checkTargetUnitType, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canBuild_native(pointer, uType, tilePos, checkTargetUnitType, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canBuildAddon() { - return canBuildAddon_native(pointer); - } - - public boolean canBuildAddon(boolean checkCommandibility) { - return canBuildAddon_native(pointer, checkCommandibility); - } - - public boolean canBuildAddon(UnitType uType, boolean checkCanIssueCommandType) { - return canBuildAddon_native(pointer, uType, checkCanIssueCommandType); - } - - public boolean canBuildAddon(UnitType uType) { - return canBuildAddon_native(pointer, uType); - } - - public boolean canBuildAddon(UnitType uType, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canBuildAddon_native(pointer, uType, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canTrain() { - return canTrain_native(pointer); - } - - public boolean canTrain(boolean checkCommandibility) { - return canTrain_native(pointer, checkCommandibility); - } - - public boolean canTrain(UnitType uType, boolean checkCanIssueCommandType) { - return canTrain_native(pointer, uType, checkCanIssueCommandType); - } - - public boolean canTrain(UnitType uType) { - return canTrain_native(pointer, uType); - } - - public boolean canTrain(UnitType uType, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canTrain_native(pointer, uType, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canMorph() { - return canMorph_native(pointer); - } - - public boolean canMorph(boolean checkCommandibility) { - return canMorph_native(pointer, checkCommandibility); - } - - public boolean canMorph(UnitType uType, boolean checkCanIssueCommandType) { - return canMorph_native(pointer, uType, checkCanIssueCommandType); - } - - public boolean canMorph(UnitType uType) { - return canMorph_native(pointer, uType); - } - - public boolean canMorph(UnitType uType, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canMorph_native(pointer, uType, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canResearch() { - return canResearch_native(pointer); - } - - public boolean canResearch(boolean checkCommandibility) { - return canResearch_native(pointer, checkCommandibility); - } - - public boolean canResearch(TechType type) { - return canResearch_native(pointer, type); - } - - public boolean canResearch(TechType type, boolean checkCanIssueCommandType) { - return canResearch_native(pointer, type, checkCanIssueCommandType); - } - - public boolean canUpgrade() { - return canUpgrade_native(pointer); - } - - public boolean canUpgrade(boolean checkCommandibility) { - return canUpgrade_native(pointer, checkCommandibility); - } - - public boolean canUpgrade(UpgradeType type) { - return canUpgrade_native(pointer, type); - } - - public boolean canUpgrade(UpgradeType type, boolean checkCanIssueCommandType) { - return canUpgrade_native(pointer, type, checkCanIssueCommandType); - } - - public boolean canSetRallyPoint() { - return canSetRallyPoint_native(pointer); - } - - public boolean canSetRallyPoint(boolean checkCommandibility) { - return canSetRallyPoint_native(pointer, checkCommandibility); - } - - public boolean canSetRallyPoint(PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType) { - return canSetRallyPoint_native(pointer, target, checkCanTargetUnit, checkCanIssueCommandType); - } - - public boolean canSetRallyPoint(PositionOrUnit target, boolean checkCanTargetUnit) { - return canSetRallyPoint_native(pointer, target, checkCanTargetUnit); - } - - public boolean canSetRallyPoint(PositionOrUnit target) { - return canSetRallyPoint_native(pointer, target); - } - - public boolean canSetRallyPoint(PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canSetRallyPoint_native(pointer, target, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canSetRallyPosition() { - return canSetRallyPosition_native(pointer); - } - - public boolean canSetRallyPosition(boolean checkCommandibility) { - return canSetRallyPosition_native(pointer, checkCommandibility); - } - - public boolean canSetRallyUnit() { - return canSetRallyUnit_native(pointer); - } - - public boolean canSetRallyUnit(boolean checkCommandibility) { - return canSetRallyUnit_native(pointer, checkCommandibility); - } - - public boolean canSetRallyUnit(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType) { - return canSetRallyUnit_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType); - } - - public boolean canSetRallyUnit(Unit targetUnit, boolean checkCanTargetUnit) { - return canSetRallyUnit_native(pointer, targetUnit, checkCanTargetUnit); - } - - public boolean canSetRallyUnit(Unit targetUnit) { - return canSetRallyUnit_native(pointer, targetUnit); - } - - public boolean canSetRallyUnit(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canSetRallyUnit_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canMove() { - return canMove_native(pointer); - } - - public boolean canMove(boolean checkCommandibility) { - return canMove_native(pointer, checkCommandibility); - } - - public boolean canMoveGrouped(boolean checkCommandibilityGrouped) { - return canMoveGrouped_native(pointer, checkCommandibilityGrouped); - } - - public boolean canMoveGrouped() { - return canMoveGrouped_native(pointer); - } - - public boolean canMoveGrouped(boolean checkCommandibilityGrouped, boolean checkCommandibility) { - return canMoveGrouped_native(pointer, checkCommandibilityGrouped, checkCommandibility); - } - - public boolean canPatrol() { - return canPatrol_native(pointer); - } - - public boolean canPatrol(boolean checkCommandibility) { - return canPatrol_native(pointer, checkCommandibility); - } - - public boolean canPatrolGrouped(boolean checkCommandibilityGrouped) { - return canPatrolGrouped_native(pointer, checkCommandibilityGrouped); - } - - public boolean canPatrolGrouped() { - return canPatrolGrouped_native(pointer); - } - - public boolean canPatrolGrouped(boolean checkCommandibilityGrouped, boolean checkCommandibility) { - return canPatrolGrouped_native(pointer, checkCommandibilityGrouped, checkCommandibility); - } - - public boolean canFollow() { - return canFollow_native(pointer); - } - - public boolean canFollow(boolean checkCommandibility) { - return canFollow_native(pointer, checkCommandibility); - } - - public boolean canFollow(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType) { - return canFollow_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType); - } - - public boolean canFollow(Unit targetUnit, boolean checkCanTargetUnit) { - return canFollow_native(pointer, targetUnit, checkCanTargetUnit); - } - - public boolean canFollow(Unit targetUnit) { - return canFollow_native(pointer, targetUnit); - } - - public boolean canFollow(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canFollow_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canGather() { - return canGather_native(pointer); - } - - public boolean canGather(boolean checkCommandibility) { - return canGather_native(pointer, checkCommandibility); - } - - public boolean canGather(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType) { - return canGather_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType); - } - - public boolean canGather(Unit targetUnit, boolean checkCanTargetUnit) { - return canGather_native(pointer, targetUnit, checkCanTargetUnit); - } - - public boolean canGather(Unit targetUnit) { - return canGather_native(pointer, targetUnit); - } - - public boolean canGather(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canGather_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canReturnCargo() { - return canReturnCargo_native(pointer); - } - - public boolean canReturnCargo(boolean checkCommandibility) { - return canReturnCargo_native(pointer, checkCommandibility); - } - - public boolean canHoldPosition() { - return canHoldPosition_native(pointer); - } - - public boolean canHoldPosition(boolean checkCommandibility) { - return canHoldPosition_native(pointer, checkCommandibility); - } - - public boolean canStop() { - return canStop_native(pointer); - } - - public boolean canStop(boolean checkCommandibility) { - return canStop_native(pointer, checkCommandibility); - } - - public boolean canRepair() { - return canRepair_native(pointer); - } - - public boolean canRepair(boolean checkCommandibility) { - return canRepair_native(pointer, checkCommandibility); - } - - public boolean canRepair(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType) { - return canRepair_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType); - } - - public boolean canRepair(Unit targetUnit, boolean checkCanTargetUnit) { - return canRepair_native(pointer, targetUnit, checkCanTargetUnit); - } - - public boolean canRepair(Unit targetUnit) { - return canRepair_native(pointer, targetUnit); - } - - public boolean canRepair(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canRepair_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canBurrow() { - return canBurrow_native(pointer); - } - - public boolean canBurrow(boolean checkCommandibility) { - return canBurrow_native(pointer, checkCommandibility); - } - - public boolean canUnburrow() { - return canUnburrow_native(pointer); - } - - public boolean canUnburrow(boolean checkCommandibility) { - return canUnburrow_native(pointer, checkCommandibility); - } - - public boolean canCloak() { - return canCloak_native(pointer); - } - - public boolean canCloak(boolean checkCommandibility) { - return canCloak_native(pointer, checkCommandibility); - } - - public boolean canDecloak() { - return canDecloak_native(pointer); - } - - public boolean canDecloak(boolean checkCommandibility) { - return canDecloak_native(pointer, checkCommandibility); - } - - public boolean canSiege() { - return canSiege_native(pointer); - } - - public boolean canSiege(boolean checkCommandibility) { - return canSiege_native(pointer, checkCommandibility); - } - - public boolean canUnsiege() { - return canUnsiege_native(pointer); - } - - public boolean canUnsiege(boolean checkCommandibility) { - return canUnsiege_native(pointer, checkCommandibility); - } - - public boolean canLift() { - return canLift_native(pointer); - } - - public boolean canLift(boolean checkCommandibility) { - return canLift_native(pointer, checkCommandibility); - } - - public boolean canLand() { - return canLand_native(pointer); - } - - public boolean canLand(boolean checkCommandibility) { - return canLand_native(pointer, checkCommandibility); - } - - public boolean canLand(TilePosition target, boolean checkCanIssueCommandType) { - return canLand_native(pointer, target, checkCanIssueCommandType); - } - - public boolean canLand(TilePosition target) { - return canLand_native(pointer, target); - } - - public boolean canLand(TilePosition target, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canLand_native(pointer, target, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canLoad() { - return canLoad_native(pointer); - } - - public boolean canLoad(boolean checkCommandibility) { - return canLoad_native(pointer, checkCommandibility); - } - - public boolean canLoad(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType) { - return canLoad_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType); - } - - public boolean canLoad(Unit targetUnit, boolean checkCanTargetUnit) { - return canLoad_native(pointer, targetUnit, checkCanTargetUnit); - } - - public boolean canLoad(Unit targetUnit) { - return canLoad_native(pointer, targetUnit); - } - - public boolean canLoad(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canLoad_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canUnloadWithOrWithoutTarget() { - return canUnloadWithOrWithoutTarget_native(pointer); - } - - public boolean canUnloadWithOrWithoutTarget(boolean checkCommandibility) { - return canUnloadWithOrWithoutTarget_native(pointer, checkCommandibility); - } - - public boolean canUnloadAtPosition(Position targDropPos, boolean checkCanIssueCommandType) { - return canUnloadAtPosition_native(pointer, targDropPos, checkCanIssueCommandType); - } - - public boolean canUnloadAtPosition(Position targDropPos) { - return canUnloadAtPosition_native(pointer, targDropPos); - } - - public boolean canUnloadAtPosition(Position targDropPos, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canUnloadAtPosition_native(pointer, targDropPos, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canUnload() { - return canUnload_native(pointer); - } - - public boolean canUnload(boolean checkCommandibility) { - return canUnload_native(pointer, checkCommandibility); - } - - public boolean canUnload(Unit targetUnit, boolean checkCanTargetUnit, boolean checkPosition, boolean checkCanIssueCommandType) { - return canUnload_native(pointer, targetUnit, checkCanTargetUnit, checkPosition, checkCanIssueCommandType); - } - - public boolean canUnload(Unit targetUnit, boolean checkCanTargetUnit, boolean checkPosition) { - return canUnload_native(pointer, targetUnit, checkCanTargetUnit, checkPosition); - } - - public boolean canUnload(Unit targetUnit, boolean checkCanTargetUnit) { - return canUnload_native(pointer, targetUnit, checkCanTargetUnit); - } - - public boolean canUnload(Unit targetUnit) { - return canUnload_native(pointer, targetUnit); - } - - public boolean canUnload(Unit targetUnit, boolean checkCanTargetUnit, boolean checkPosition, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canUnload_native(pointer, targetUnit, checkCanTargetUnit, checkPosition, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canUnloadAll() { - return canUnloadAll_native(pointer); - } - - public boolean canUnloadAll(boolean checkCommandibility) { - return canUnloadAll_native(pointer, checkCommandibility); - } - - public boolean canUnloadAllPosition() { - return canUnloadAllPosition_native(pointer); - } - - public boolean canUnloadAllPosition(boolean checkCommandibility) { - return canUnloadAllPosition_native(pointer, checkCommandibility); - } - - public boolean canUnloadAllPosition(Position targDropPos, boolean checkCanIssueCommandType) { - return canUnloadAllPosition_native(pointer, targDropPos, checkCanIssueCommandType); - } - - public boolean canUnloadAllPosition(Position targDropPos) { - return canUnloadAllPosition_native(pointer, targDropPos); - } - - public boolean canUnloadAllPosition(Position targDropPos, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canUnloadAllPosition_native(pointer, targDropPos, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canRightClick() { - return canRightClick_native(pointer); - } - - public boolean canRightClick(boolean checkCommandibility) { - return canRightClick_native(pointer, checkCommandibility); - } - - public boolean canRightClick(PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType) { - return canRightClick_native(pointer, target, checkCanTargetUnit, checkCanIssueCommandType); - } - - public boolean canRightClick(PositionOrUnit target, boolean checkCanTargetUnit) { - return canRightClick_native(pointer, target, checkCanTargetUnit); - } - - public boolean canRightClick(PositionOrUnit target) { - return canRightClick_native(pointer, target); - } - - public boolean canRightClick(PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canRightClick_native(pointer, target, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canRightClickGrouped(boolean checkCommandibilityGrouped) { - return canRightClickGrouped_native(pointer, checkCommandibilityGrouped); - } - - public boolean canRightClickGrouped() { - return canRightClickGrouped_native(pointer); - } - - public boolean canRightClickGrouped(boolean checkCommandibilityGrouped, boolean checkCommandibility) { - return canRightClickGrouped_native(pointer, checkCommandibilityGrouped, checkCommandibility); - } - - public boolean canRightClickGrouped(PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped) { - return canRightClickGrouped_native(pointer, target, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibilityGrouped); - } - - public boolean canRightClickGrouped(PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType) { - return canRightClickGrouped_native(pointer, target, checkCanTargetUnit, checkCanIssueCommandType); - } - - public boolean canRightClickGrouped(PositionOrUnit target, boolean checkCanTargetUnit) { - return canRightClickGrouped_native(pointer, target, checkCanTargetUnit); - } - - public boolean canRightClickGrouped(PositionOrUnit target) { - return canRightClickGrouped_native(pointer, target); - } - - public boolean canRightClickGrouped(PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped, boolean checkCommandibility) { - return canRightClickGrouped_native(pointer, target, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibilityGrouped, checkCommandibility); - } - - public boolean canRightClickPosition() { - return canRightClickPosition_native(pointer); - } - - public boolean canRightClickPosition(boolean checkCommandibility) { - return canRightClickPosition_native(pointer, checkCommandibility); - } - - public boolean canRightClickPositionGrouped(boolean checkCommandibilityGrouped) { - return canRightClickPositionGrouped_native(pointer, checkCommandibilityGrouped); - } - - public boolean canRightClickPositionGrouped() { - return canRightClickPositionGrouped_native(pointer); - } - - public boolean canRightClickPositionGrouped(boolean checkCommandibilityGrouped, boolean checkCommandibility) { - return canRightClickPositionGrouped_native(pointer, checkCommandibilityGrouped, checkCommandibility); - } - - public boolean canRightClickUnit() { - return canRightClickUnit_native(pointer); - } - - public boolean canRightClickUnit(boolean checkCommandibility) { - return canRightClickUnit_native(pointer, checkCommandibility); - } - - public boolean canRightClickUnit(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType) { - return canRightClickUnit_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType); - } - - public boolean canRightClickUnit(Unit targetUnit, boolean checkCanTargetUnit) { - return canRightClickUnit_native(pointer, targetUnit, checkCanTargetUnit); - } - - public boolean canRightClickUnit(Unit targetUnit) { - return canRightClickUnit_native(pointer, targetUnit); - } - - public boolean canRightClickUnit(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canRightClickUnit_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canRightClickUnitGrouped(boolean checkCommandibilityGrouped) { - return canRightClickUnitGrouped_native(pointer, checkCommandibilityGrouped); - } - - public boolean canRightClickUnitGrouped() { - return canRightClickUnitGrouped_native(pointer); - } - - public boolean canRightClickUnitGrouped(boolean checkCommandibilityGrouped, boolean checkCommandibility) { - return canRightClickUnitGrouped_native(pointer, checkCommandibilityGrouped, checkCommandibility); - } - - public boolean canRightClickUnitGrouped(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped) { - return canRightClickUnitGrouped_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibilityGrouped); - } - - public boolean canRightClickUnitGrouped(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType) { - return canRightClickUnitGrouped_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType); - } - - public boolean canRightClickUnitGrouped(Unit targetUnit, boolean checkCanTargetUnit) { - return canRightClickUnitGrouped_native(pointer, targetUnit, checkCanTargetUnit); - } - - public boolean canRightClickUnitGrouped(Unit targetUnit) { - return canRightClickUnitGrouped_native(pointer, targetUnit); - } - - public boolean canRightClickUnitGrouped(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped, boolean checkCommandibility) { - return canRightClickUnitGrouped_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibilityGrouped, checkCommandibility); - } - - public boolean canHaltConstruction() { - return canHaltConstruction_native(pointer); - } - - public boolean canHaltConstruction(boolean checkCommandibility) { - return canHaltConstruction_native(pointer, checkCommandibility); - } - - public boolean canCancelConstruction() { - return canCancelConstruction_native(pointer); - } - - public boolean canCancelConstruction(boolean checkCommandibility) { - return canCancelConstruction_native(pointer, checkCommandibility); - } - - public boolean canCancelAddon() { - return canCancelAddon_native(pointer); - } - - public boolean canCancelAddon(boolean checkCommandibility) { - return canCancelAddon_native(pointer, checkCommandibility); - } - - public boolean canCancelTrain() { - return canCancelTrain_native(pointer); - } - - public boolean canCancelTrain(boolean checkCommandibility) { - return canCancelTrain_native(pointer, checkCommandibility); - } - - public boolean canCancelTrainSlot() { - return canCancelTrainSlot_native(pointer); - } - - public boolean canCancelTrainSlot(boolean checkCommandibility) { - return canCancelTrainSlot_native(pointer, checkCommandibility); - } - - public boolean canCancelTrainSlot(int slot, boolean checkCanIssueCommandType) { - return canCancelTrainSlot_native(pointer, slot, checkCanIssueCommandType); - } - - public boolean canCancelTrainSlot(int slot) { - return canCancelTrainSlot_native(pointer, slot); - } - - public boolean canCancelTrainSlot(int slot, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canCancelTrainSlot_native(pointer, slot, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canCancelMorph() { - return canCancelMorph_native(pointer); - } - - public boolean canCancelMorph(boolean checkCommandibility) { - return canCancelMorph_native(pointer, checkCommandibility); - } - - public boolean canCancelResearch() { - return canCancelResearch_native(pointer); - } - - public boolean canCancelResearch(boolean checkCommandibility) { - return canCancelResearch_native(pointer, checkCommandibility); - } - - public boolean canCancelUpgrade() { - return canCancelUpgrade_native(pointer); - } - - public boolean canCancelUpgrade(boolean checkCommandibility) { - return canCancelUpgrade_native(pointer, checkCommandibility); - } - - public boolean canUseTechWithOrWithoutTarget() { - return canUseTechWithOrWithoutTarget_native(pointer); - } - - public boolean canUseTechWithOrWithoutTarget(boolean checkCommandibility) { - return canUseTechWithOrWithoutTarget_native(pointer, checkCommandibility); - } - - public boolean canUseTechWithOrWithoutTarget(TechType tech, boolean checkCanIssueCommandType) { - return canUseTechWithOrWithoutTarget_native(pointer, tech, checkCanIssueCommandType); - } - - public boolean canUseTechWithOrWithoutTarget(TechType tech) { - return canUseTechWithOrWithoutTarget_native(pointer, tech); - } - - public boolean canUseTechWithOrWithoutTarget(TechType tech, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canUseTechWithOrWithoutTarget_native(pointer, tech, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canUseTech(TechType tech, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkTargetsType, boolean checkCanIssueCommandType) { - return canUseTech_native(pointer, tech, target, checkCanTargetUnit, checkTargetsType, checkCanIssueCommandType); - } - - public boolean canUseTech(TechType tech, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkTargetsType) { - return canUseTech_native(pointer, tech, target, checkCanTargetUnit, checkTargetsType); - } - - public boolean canUseTech(TechType tech, PositionOrUnit target, boolean checkCanTargetUnit) { - return canUseTech_native(pointer, tech, target, checkCanTargetUnit); - } - - public boolean canUseTech(TechType tech, PositionOrUnit target) { - return canUseTech_native(pointer, tech, target); - } - - public boolean canUseTech(TechType tech) { - return canUseTech_native(pointer, tech); - } - - public boolean canUseTech(TechType tech, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkTargetsType, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canUseTech_native(pointer, tech, target, checkCanTargetUnit, checkTargetsType, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canUseTechWithoutTarget(TechType tech, boolean checkCanIssueCommandType) { - return canUseTechWithoutTarget_native(pointer, tech, checkCanIssueCommandType); - } - - public boolean canUseTechWithoutTarget(TechType tech) { - return canUseTechWithoutTarget_native(pointer, tech); - } - - public boolean canUseTechWithoutTarget(TechType tech, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canUseTechWithoutTarget_native(pointer, tech, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canUseTechUnit(TechType tech, boolean checkCanIssueCommandType) { - return canUseTechUnit_native(pointer, tech, checkCanIssueCommandType); - } - - public boolean canUseTechUnit(TechType tech) { - return canUseTechUnit_native(pointer, tech); - } - - public boolean canUseTechUnit(TechType tech, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canUseTechUnit_native(pointer, tech, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canUseTechUnit(TechType tech, Unit targetUnit, boolean checkCanTargetUnit, boolean checkTargetsUnits, boolean checkCanIssueCommandType) { - return canUseTechUnit_native(pointer, tech, targetUnit, checkCanTargetUnit, checkTargetsUnits, checkCanIssueCommandType); - } - - public boolean canUseTechUnit(TechType tech, Unit targetUnit, boolean checkCanTargetUnit, boolean checkTargetsUnits) { - return canUseTechUnit_native(pointer, tech, targetUnit, checkCanTargetUnit, checkTargetsUnits); - } - - public boolean canUseTechUnit(TechType tech, Unit targetUnit, boolean checkCanTargetUnit) { - return canUseTechUnit_native(pointer, tech, targetUnit, checkCanTargetUnit); - } - - public boolean canUseTechUnit(TechType tech, Unit targetUnit) { - return canUseTechUnit_native(pointer, tech, targetUnit); - } - - public boolean canUseTechUnit(TechType tech, Unit targetUnit, boolean checkCanTargetUnit, boolean checkTargetsUnits, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canUseTechUnit_native(pointer, tech, targetUnit, checkCanTargetUnit, checkTargetsUnits, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canUseTechPosition(TechType tech, boolean checkCanIssueCommandType) { - return canUseTechPosition_native(pointer, tech, checkCanIssueCommandType); - } - - public boolean canUseTechPosition(TechType tech) { - return canUseTechPosition_native(pointer, tech); - } - - public boolean canUseTechPosition(TechType tech, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canUseTechPosition_native(pointer, tech, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canUseTechPosition(TechType tech, Position target, boolean checkTargetsPositions, boolean checkCanIssueCommandType) { - return canUseTechPosition_native(pointer, tech, target, checkTargetsPositions, checkCanIssueCommandType); - } - - public boolean canUseTechPosition(TechType tech, Position target, boolean checkTargetsPositions) { - return canUseTechPosition_native(pointer, tech, target, checkTargetsPositions); - } - - public boolean canUseTechPosition(TechType tech, Position target) { - return canUseTechPosition_native(pointer, tech, target); - } - - public boolean canUseTechPosition(TechType tech, Position target, boolean checkTargetsPositions, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canUseTechPosition_native(pointer, tech, target, checkTargetsPositions, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canPlaceCOP() { - return canPlaceCOP_native(pointer); - } - - public boolean canPlaceCOP(boolean checkCommandibility) { - return canPlaceCOP_native(pointer, checkCommandibility); - } - - public boolean canPlaceCOP(TilePosition target, boolean checkCanIssueCommandType) { - return canPlaceCOP_native(pointer, target, checkCanIssueCommandType); - } - - public boolean canPlaceCOP(TilePosition target) { - return canPlaceCOP_native(pointer, target); - } - - public boolean canPlaceCOP(TilePosition target, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canPlaceCOP_native(pointer, target, checkCanIssueCommandType, checkCommandibility); - } - - - private static Map instances = new HashMap(); - - private Unit(long pointer) { - this.pointer = pointer; - } - - private static Unit get(long pointer) { - if (pointer == 0 ) { - return null; - } - Unit instance = instances.get(pointer); - if (instance == null ) { - instance = new Unit(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native int getID_native(long pointer); - - private native boolean exists_native(long pointer); - - private native int getReplayID_native(long pointer); - - private native Player getPlayer_native(long pointer); - - private native UnitType getType_native(long pointer); - - private native Position getPosition_native(long pointer); - - private native TilePosition getTilePosition_native(long pointer); - - private native double getAngle_native(long pointer); - - private native double getVelocityX_native(long pointer); - - private native double getVelocityY_native(long pointer); - - private native Region getRegion_native(long pointer); - - private native int getLeft_native(long pointer); - - private native int getTop_native(long pointer); - - private native int getRight_native(long pointer); - - private native int getBottom_native(long pointer); - - private native int getHitPoints_native(long pointer); - - private native int getShields_native(long pointer); - - private native int getEnergy_native(long pointer); - - private native int getResources_native(long pointer); - - private native int getResourceGroup_native(long pointer); - - private native int getDistance_native(long pointer, PositionOrUnit target); - - private native boolean hasPath_native(long pointer, PositionOrUnit target); - - private native int getLastCommandFrame_native(long pointer); - - private native UnitCommand getLastCommand_native(long pointer); - - private native Player getLastAttackingPlayer_native(long pointer); - - private native UnitType getInitialType_native(long pointer); - - private native Position getInitialPosition_native(long pointer); - - private native TilePosition getInitialTilePosition_native(long pointer); - - private native int getInitialHitPoints_native(long pointer); - - private native int getInitialResources_native(long pointer); - - private native int getKillCount_native(long pointer); - - private native int getAcidSporeCount_native(long pointer); - - private native int getInterceptorCount_native(long pointer); - - private native int getScarabCount_native(long pointer); - - private native int getSpiderMineCount_native(long pointer); - - private native int getGroundWeaponCooldown_native(long pointer); - - private native int getAirWeaponCooldown_native(long pointer); - - private native int getSpellCooldown_native(long pointer); - - private native int getDefenseMatrixPoints_native(long pointer); - - private native int getDefenseMatrixTimer_native(long pointer); - - private native int getEnsnareTimer_native(long pointer); - - private native int getIrradiateTimer_native(long pointer); - - private native int getLockdownTimer_native(long pointer); - - private native int getMaelstromTimer_native(long pointer); - - private native int getOrderTimer_native(long pointer); - - private native int getPlagueTimer_native(long pointer); - - private native int getRemoveTimer_native(long pointer); - - private native int getStasisTimer_native(long pointer); - - private native int getStimTimer_native(long pointer); - - private native UnitType getBuildType_native(long pointer); - - private native TechType getTech_native(long pointer); - - private native UpgradeType getUpgrade_native(long pointer); - - private native int getRemainingBuildTime_native(long pointer); - - private native int getRemainingTrainTime_native(long pointer); - - private native int getRemainingResearchTime_native(long pointer); - - private native int getRemainingUpgradeTime_native(long pointer); - - private native Unit getBuildUnit_native(long pointer); - - private native Unit getTarget_native(long pointer); - - private native Position getTargetPosition_native(long pointer); - - private native Order getOrder_native(long pointer); - - private native Order getSecondaryOrder_native(long pointer); - - private native Unit getOrderTarget_native(long pointer); - - private native Position getOrderTargetPosition_native(long pointer); - - private native Position getRallyPosition_native(long pointer); - - private native Unit getRallyUnit_native(long pointer); - - private native Unit getAddon_native(long pointer); - - private native Unit getNydusExit_native(long pointer); - - private native Unit getPowerUp_native(long pointer); - - private native Unit getTransport_native(long pointer); - - private native List getLoadedUnits_native(long pointer); - - private native int getSpaceRemaining_native(long pointer); - - private native Unit getCarrier_native(long pointer); - - private native List getInterceptors_native(long pointer); - - private native Unit getHatchery_native(long pointer); - - private native List getLarva_native(long pointer); - - private native boolean hasNuke_native(long pointer); - - private native boolean isAccelerating_native(long pointer); - - private native boolean isAttacking_native(long pointer); - - private native boolean isAttackFrame_native(long pointer); - - private native boolean isBeingConstructed_native(long pointer); - - private native boolean isBeingGathered_native(long pointer); - - private native boolean isBeingHealed_native(long pointer); - - private native boolean isBlind_native(long pointer); - - private native boolean isBraking_native(long pointer); - - private native boolean isBurrowed_native(long pointer); - - private native boolean isCarryingGas_native(long pointer); - - private native boolean isCarryingMinerals_native(long pointer); - - private native boolean isCloaked_native(long pointer); - - private native boolean isCompleted_native(long pointer); - - private native boolean isConstructing_native(long pointer); - - private native boolean isDefenseMatrixed_native(long pointer); - - private native boolean isDetected_native(long pointer); - - private native boolean isEnsnared_native(long pointer); - - private native boolean isFlying_native(long pointer); - - private native boolean isFollowing_native(long pointer); - - private native boolean isGatheringGas_native(long pointer); - - private native boolean isGatheringMinerals_native(long pointer); - - private native boolean isHallucination_native(long pointer); - - private native boolean isHoldingPosition_native(long pointer); - - private native boolean isIdle_native(long pointer); - - private native boolean isInterruptible_native(long pointer); - - private native boolean isInvincible_native(long pointer); - - private native boolean isInWeaponRange_native(long pointer, Unit target); - - private native boolean isIrradiated_native(long pointer); - - private native boolean isLifted_native(long pointer); - - private native boolean isLoaded_native(long pointer); - - private native boolean isLockedDown_native(long pointer); - - private native boolean isMaelstrommed_native(long pointer); - - private native boolean isMorphing_native(long pointer); - - private native boolean isMoving_native(long pointer); - - private native boolean isParasited_native(long pointer); - - private native boolean isPatrolling_native(long pointer); - - private native boolean isPlagued_native(long pointer); - - private native boolean isRepairing_native(long pointer); - - private native boolean isResearching_native(long pointer); - - private native boolean isSelected_native(long pointer); - - private native boolean isSieged_native(long pointer); - - private native boolean isStartingAttack_native(long pointer); - - private native boolean isStasised_native(long pointer); - - private native boolean isStimmed_native(long pointer); - - private native boolean isStuck_native(long pointer); - - private native boolean isTraining_native(long pointer); - - private native boolean isUnderAttack_native(long pointer); - - private native boolean isUnderDarkSwarm_native(long pointer); - - private native boolean isUnderDisruptionWeb_native(long pointer); - - private native boolean isUnderStorm_native(long pointer); - - private native boolean isPowered_native(long pointer); - - private native boolean isUpgrading_native(long pointer); - - private native boolean isVisible_native(long pointer); - - private native boolean isVisible_native(long pointer, Player player); - - private native boolean isTargetable_native(long pointer); - - private native boolean issueCommand_native(long pointer, UnitCommand command); - - private native boolean attack_native(long pointer, PositionOrUnit target); - - private native boolean attack_native(long pointer, PositionOrUnit target, boolean shiftQueueCommand); - - private native boolean build_native(long pointer, UnitType type); - - private native boolean build_native(long pointer, UnitType type, TilePosition target); - - private native boolean buildAddon_native(long pointer, UnitType type); - - private native boolean train_native(long pointer); - - private native boolean train_native(long pointer, UnitType type); - - private native boolean morph_native(long pointer, UnitType type); - - private native boolean research_native(long pointer, TechType tech); - - private native boolean upgrade_native(long pointer, UpgradeType upgrade); - - private native boolean setRallyPoint_native(long pointer, PositionOrUnit target); - - private native boolean move_native(long pointer, Position target); - - private native boolean move_native(long pointer, Position target, boolean shiftQueueCommand); - - private native boolean patrol_native(long pointer, Position target); - - private native boolean patrol_native(long pointer, Position target, boolean shiftQueueCommand); - - private native boolean holdPosition_native(long pointer); - - private native boolean holdPosition_native(long pointer, boolean shiftQueueCommand); - - private native boolean stop_native(long pointer); - - private native boolean stop_native(long pointer, boolean shiftQueueCommand); - - private native boolean follow_native(long pointer, Unit target); - - private native boolean follow_native(long pointer, Unit target, boolean shiftQueueCommand); - - private native boolean gather_native(long pointer, Unit target); - - private native boolean gather_native(long pointer, Unit target, boolean shiftQueueCommand); - - private native boolean returnCargo_native(long pointer); - - private native boolean returnCargo_native(long pointer, boolean shiftQueueCommand); - - private native boolean repair_native(long pointer, Unit target); - - private native boolean repair_native(long pointer, Unit target, boolean shiftQueueCommand); - - private native boolean burrow_native(long pointer); - - private native boolean unburrow_native(long pointer); - - private native boolean cloak_native(long pointer); - - private native boolean decloak_native(long pointer); - - private native boolean siege_native(long pointer); - - private native boolean unsiege_native(long pointer); - - private native boolean lift_native(long pointer); - - private native boolean land_native(long pointer, TilePosition target); - - private native boolean load_native(long pointer, Unit target); - - private native boolean load_native(long pointer, Unit target, boolean shiftQueueCommand); - - private native boolean unload_native(long pointer, Unit target); - - private native boolean unloadAll_native(long pointer); - - private native boolean unloadAll_native(long pointer, boolean shiftQueueCommand); - - private native boolean unloadAll_native(long pointer, Position target); - - private native boolean unloadAll_native(long pointer, Position target, boolean shiftQueueCommand); - - private native boolean rightClick_native(long pointer, PositionOrUnit target); - - private native boolean rightClick_native(long pointer, PositionOrUnit target, boolean shiftQueueCommand); - - private native boolean haltConstruction_native(long pointer); - - private native boolean cancelConstruction_native(long pointer); - - private native boolean cancelAddon_native(long pointer); - - private native boolean cancelTrain_native(long pointer); - - private native boolean cancelTrain_native(long pointer, int slot); - - private native boolean cancelMorph_native(long pointer); - - private native boolean cancelResearch_native(long pointer); - - private native boolean cancelUpgrade_native(long pointer); - - private native boolean useTech_native(long pointer, TechType tech); - - private native boolean useTech_native(long pointer, TechType tech, PositionOrUnit target); - - private native boolean placeCOP_native(long pointer, TilePosition target); - - private native boolean canIssueCommand_native(long pointer, UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanBuildUnitType, boolean checkCanTargetUnit, boolean checkCanIssueCommandType); - - private native boolean canIssueCommand_native(long pointer, UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanBuildUnitType, boolean checkCanTargetUnit); - - private native boolean canIssueCommand_native(long pointer, UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanBuildUnitType); - - private native boolean canIssueCommand_native(long pointer, UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits); - - private native boolean canIssueCommand_native(long pointer, UnitCommand command, boolean checkCanUseTechPositionOnPositions); - - private native boolean canIssueCommand_native(long pointer, UnitCommand command); - - private native boolean canIssueCommand_native(long pointer, UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanBuildUnitType, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canIssueCommandGrouped_native(long pointer, UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped); - - private native boolean canIssueCommandGrouped_native(long pointer, UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanTargetUnit, boolean checkCanIssueCommandType); - - private native boolean canIssueCommandGrouped_native(long pointer, UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanTargetUnit); - - private native boolean canIssueCommandGrouped_native(long pointer, UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits); - - private native boolean canIssueCommandGrouped_native(long pointer, UnitCommand command, boolean checkCanUseTechPositionOnPositions); - - private native boolean canIssueCommandGrouped_native(long pointer, UnitCommand command); - - private native boolean canIssueCommandGrouped_native(long pointer, UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped, boolean checkCommandibility); - - private native boolean canCommand_native(long pointer); - - private native boolean canCommandGrouped_native(long pointer); - - private native boolean canCommandGrouped_native(long pointer, boolean checkCommandibility); - - private native boolean canIssueCommandType_native(long pointer, UnitCommandType ct); - - private native boolean canIssueCommandType_native(long pointer, UnitCommandType ct, boolean checkCommandibility); - - private native boolean canIssueCommandTypeGrouped_native(long pointer, UnitCommandType ct, boolean checkCommandibilityGrouped); - - private native boolean canIssueCommandTypeGrouped_native(long pointer, UnitCommandType ct); - - private native boolean canIssueCommandTypeGrouped_native(long pointer, UnitCommandType ct, boolean checkCommandibilityGrouped, boolean checkCommandibility); - - private native boolean canTargetUnit_native(long pointer, Unit targetUnit); - - private native boolean canTargetUnit_native(long pointer, Unit targetUnit, boolean checkCommandibility); - - private native boolean canAttack_native(long pointer); - - private native boolean canAttack_native(long pointer, boolean checkCommandibility); - - private native boolean canAttack_native(long pointer, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType); - - private native boolean canAttack_native(long pointer, PositionOrUnit target, boolean checkCanTargetUnit); - - private native boolean canAttack_native(long pointer, PositionOrUnit target); - - private native boolean canAttack_native(long pointer, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canAttackGrouped_native(long pointer, boolean checkCommandibilityGrouped); - - private native boolean canAttackGrouped_native(long pointer); - - private native boolean canAttackGrouped_native(long pointer, boolean checkCommandibilityGrouped, boolean checkCommandibility); - - private native boolean canAttackGrouped_native(long pointer, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped); - - private native boolean canAttackGrouped_native(long pointer, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType); - - private native boolean canAttackGrouped_native(long pointer, PositionOrUnit target, boolean checkCanTargetUnit); - - private native boolean canAttackGrouped_native(long pointer, PositionOrUnit target); - - private native boolean canAttackGrouped_native(long pointer, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped, boolean checkCommandibility); - - private native boolean canAttackMove_native(long pointer); - - private native boolean canAttackMove_native(long pointer, boolean checkCommandibility); - - private native boolean canAttackMoveGrouped_native(long pointer, boolean checkCommandibilityGrouped); - - private native boolean canAttackMoveGrouped_native(long pointer); - - private native boolean canAttackMoveGrouped_native(long pointer, boolean checkCommandibilityGrouped, boolean checkCommandibility); - - private native boolean canAttackUnit_native(long pointer); - - private native boolean canAttackUnit_native(long pointer, boolean checkCommandibility); - - private native boolean canAttackUnit_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType); - - private native boolean canAttackUnit_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit); - - private native boolean canAttackUnit_native(long pointer, Unit targetUnit); - - private native boolean canAttackUnit_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canAttackUnitGrouped_native(long pointer, boolean checkCommandibilityGrouped); - - private native boolean canAttackUnitGrouped_native(long pointer); - - private native boolean canAttackUnitGrouped_native(long pointer, boolean checkCommandibilityGrouped, boolean checkCommandibility); - - private native boolean canAttackUnitGrouped_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped); - - private native boolean canAttackUnitGrouped_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType); - - private native boolean canAttackUnitGrouped_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit); - - private native boolean canAttackUnitGrouped_native(long pointer, Unit targetUnit); - - private native boolean canAttackUnitGrouped_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped, boolean checkCommandibility); - - private native boolean canBuild_native(long pointer); - - private native boolean canBuild_native(long pointer, boolean checkCommandibility); - - private native boolean canBuild_native(long pointer, UnitType uType, boolean checkCanIssueCommandType); - - private native boolean canBuild_native(long pointer, UnitType uType); - - private native boolean canBuild_native(long pointer, UnitType uType, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canBuild_native(long pointer, UnitType uType, TilePosition tilePos, boolean checkTargetUnitType, boolean checkCanIssueCommandType); - - private native boolean canBuild_native(long pointer, UnitType uType, TilePosition tilePos, boolean checkTargetUnitType); - - private native boolean canBuild_native(long pointer, UnitType uType, TilePosition tilePos); - - private native boolean canBuild_native(long pointer, UnitType uType, TilePosition tilePos, boolean checkTargetUnitType, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canBuildAddon_native(long pointer); - - private native boolean canBuildAddon_native(long pointer, boolean checkCommandibility); - - private native boolean canBuildAddon_native(long pointer, UnitType uType, boolean checkCanIssueCommandType); - - private native boolean canBuildAddon_native(long pointer, UnitType uType); - - private native boolean canBuildAddon_native(long pointer, UnitType uType, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canTrain_native(long pointer); - - private native boolean canTrain_native(long pointer, boolean checkCommandibility); - - private native boolean canTrain_native(long pointer, UnitType uType, boolean checkCanIssueCommandType); - - private native boolean canTrain_native(long pointer, UnitType uType); - - private native boolean canTrain_native(long pointer, UnitType uType, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canMorph_native(long pointer); - - private native boolean canMorph_native(long pointer, boolean checkCommandibility); - - private native boolean canMorph_native(long pointer, UnitType uType, boolean checkCanIssueCommandType); - - private native boolean canMorph_native(long pointer, UnitType uType); - - private native boolean canMorph_native(long pointer, UnitType uType, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canResearch_native(long pointer); - - private native boolean canResearch_native(long pointer, boolean checkCommandibility); - - private native boolean canResearch_native(long pointer, TechType type); - - private native boolean canResearch_native(long pointer, TechType type, boolean checkCanIssueCommandType); - - private native boolean canUpgrade_native(long pointer); - - private native boolean canUpgrade_native(long pointer, boolean checkCommandibility); - - private native boolean canUpgrade_native(long pointer, UpgradeType type); - - private native boolean canUpgrade_native(long pointer, UpgradeType type, boolean checkCanIssueCommandType); - - private native boolean canSetRallyPoint_native(long pointer); - - private native boolean canSetRallyPoint_native(long pointer, boolean checkCommandibility); - - private native boolean canSetRallyPoint_native(long pointer, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType); - - private native boolean canSetRallyPoint_native(long pointer, PositionOrUnit target, boolean checkCanTargetUnit); - - private native boolean canSetRallyPoint_native(long pointer, PositionOrUnit target); - - private native boolean canSetRallyPoint_native(long pointer, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canSetRallyPosition_native(long pointer); - - private native boolean canSetRallyPosition_native(long pointer, boolean checkCommandibility); - - private native boolean canSetRallyUnit_native(long pointer); - - private native boolean canSetRallyUnit_native(long pointer, boolean checkCommandibility); - - private native boolean canSetRallyUnit_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType); - - private native boolean canSetRallyUnit_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit); - - private native boolean canSetRallyUnit_native(long pointer, Unit targetUnit); - - private native boolean canSetRallyUnit_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canMove_native(long pointer); - - private native boolean canMove_native(long pointer, boolean checkCommandibility); - - private native boolean canMoveGrouped_native(long pointer, boolean checkCommandibilityGrouped); - - private native boolean canMoveGrouped_native(long pointer); - - private native boolean canMoveGrouped_native(long pointer, boolean checkCommandibilityGrouped, boolean checkCommandibility); - - private native boolean canPatrol_native(long pointer); - - private native boolean canPatrol_native(long pointer, boolean checkCommandibility); - - private native boolean canPatrolGrouped_native(long pointer, boolean checkCommandibilityGrouped); - - private native boolean canPatrolGrouped_native(long pointer); - - private native boolean canPatrolGrouped_native(long pointer, boolean checkCommandibilityGrouped, boolean checkCommandibility); - - private native boolean canFollow_native(long pointer); - - private native boolean canFollow_native(long pointer, boolean checkCommandibility); - - private native boolean canFollow_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType); - - private native boolean canFollow_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit); - - private native boolean canFollow_native(long pointer, Unit targetUnit); - - private native boolean canFollow_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canGather_native(long pointer); - - private native boolean canGather_native(long pointer, boolean checkCommandibility); - - private native boolean canGather_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType); - - private native boolean canGather_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit); - - private native boolean canGather_native(long pointer, Unit targetUnit); - - private native boolean canGather_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canReturnCargo_native(long pointer); - - private native boolean canReturnCargo_native(long pointer, boolean checkCommandibility); - - private native boolean canHoldPosition_native(long pointer); - - private native boolean canHoldPosition_native(long pointer, boolean checkCommandibility); - - private native boolean canStop_native(long pointer); - - private native boolean canStop_native(long pointer, boolean checkCommandibility); - - private native boolean canRepair_native(long pointer); - - private native boolean canRepair_native(long pointer, boolean checkCommandibility); - - private native boolean canRepair_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType); - - private native boolean canRepair_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit); - - private native boolean canRepair_native(long pointer, Unit targetUnit); - - private native boolean canRepair_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canBurrow_native(long pointer); - - private native boolean canBurrow_native(long pointer, boolean checkCommandibility); - - private native boolean canUnburrow_native(long pointer); - - private native boolean canUnburrow_native(long pointer, boolean checkCommandibility); - - private native boolean canCloak_native(long pointer); - - private native boolean canCloak_native(long pointer, boolean checkCommandibility); - - private native boolean canDecloak_native(long pointer); - - private native boolean canDecloak_native(long pointer, boolean checkCommandibility); - - private native boolean canSiege_native(long pointer); - - private native boolean canSiege_native(long pointer, boolean checkCommandibility); - - private native boolean canUnsiege_native(long pointer); - - private native boolean canUnsiege_native(long pointer, boolean checkCommandibility); - - private native boolean canLift_native(long pointer); - - private native boolean canLift_native(long pointer, boolean checkCommandibility); - - private native boolean canLand_native(long pointer); - - private native boolean canLand_native(long pointer, boolean checkCommandibility); - - private native boolean canLand_native(long pointer, TilePosition target, boolean checkCanIssueCommandType); - - private native boolean canLand_native(long pointer, TilePosition target); - - private native boolean canLand_native(long pointer, TilePosition target, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canLoad_native(long pointer); - - private native boolean canLoad_native(long pointer, boolean checkCommandibility); - - private native boolean canLoad_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType); - - private native boolean canLoad_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit); - - private native boolean canLoad_native(long pointer, Unit targetUnit); - - private native boolean canLoad_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canUnloadWithOrWithoutTarget_native(long pointer); - - private native boolean canUnloadWithOrWithoutTarget_native(long pointer, boolean checkCommandibility); - - private native boolean canUnloadAtPosition_native(long pointer, Position targDropPos, boolean checkCanIssueCommandType); - - private native boolean canUnloadAtPosition_native(long pointer, Position targDropPos); - - private native boolean canUnloadAtPosition_native(long pointer, Position targDropPos, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canUnload_native(long pointer); - - private native boolean canUnload_native(long pointer, boolean checkCommandibility); - - private native boolean canUnload_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkPosition, boolean checkCanIssueCommandType); - - private native boolean canUnload_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkPosition); - - private native boolean canUnload_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit); - - private native boolean canUnload_native(long pointer, Unit targetUnit); - - private native boolean canUnload_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkPosition, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canUnloadAll_native(long pointer); - - private native boolean canUnloadAll_native(long pointer, boolean checkCommandibility); - - private native boolean canUnloadAllPosition_native(long pointer); - - private native boolean canUnloadAllPosition_native(long pointer, boolean checkCommandibility); - - private native boolean canUnloadAllPosition_native(long pointer, Position targDropPos, boolean checkCanIssueCommandType); - - private native boolean canUnloadAllPosition_native(long pointer, Position targDropPos); - - private native boolean canUnloadAllPosition_native(long pointer, Position targDropPos, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canRightClick_native(long pointer); - - private native boolean canRightClick_native(long pointer, boolean checkCommandibility); - - private native boolean canRightClick_native(long pointer, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType); - - private native boolean canRightClick_native(long pointer, PositionOrUnit target, boolean checkCanTargetUnit); - - private native boolean canRightClick_native(long pointer, PositionOrUnit target); - - private native boolean canRightClick_native(long pointer, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canRightClickGrouped_native(long pointer, boolean checkCommandibilityGrouped); - - private native boolean canRightClickGrouped_native(long pointer); - - private native boolean canRightClickGrouped_native(long pointer, boolean checkCommandibilityGrouped, boolean checkCommandibility); - - private native boolean canRightClickGrouped_native(long pointer, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped); - - private native boolean canRightClickGrouped_native(long pointer, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType); - - private native boolean canRightClickGrouped_native(long pointer, PositionOrUnit target, boolean checkCanTargetUnit); - - private native boolean canRightClickGrouped_native(long pointer, PositionOrUnit target); - - private native boolean canRightClickGrouped_native(long pointer, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped, boolean checkCommandibility); - - private native boolean canRightClickPosition_native(long pointer); - - private native boolean canRightClickPosition_native(long pointer, boolean checkCommandibility); - - private native boolean canRightClickPositionGrouped_native(long pointer, boolean checkCommandibilityGrouped); - - private native boolean canRightClickPositionGrouped_native(long pointer); - - private native boolean canRightClickPositionGrouped_native(long pointer, boolean checkCommandibilityGrouped, boolean checkCommandibility); - - private native boolean canRightClickUnit_native(long pointer); - - private native boolean canRightClickUnit_native(long pointer, boolean checkCommandibility); - - private native boolean canRightClickUnit_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType); - - private native boolean canRightClickUnit_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit); - - private native boolean canRightClickUnit_native(long pointer, Unit targetUnit); - - private native boolean canRightClickUnit_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canRightClickUnitGrouped_native(long pointer, boolean checkCommandibilityGrouped); - - private native boolean canRightClickUnitGrouped_native(long pointer); - - private native boolean canRightClickUnitGrouped_native(long pointer, boolean checkCommandibilityGrouped, boolean checkCommandibility); - - private native boolean canRightClickUnitGrouped_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped); - - private native boolean canRightClickUnitGrouped_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType); - - private native boolean canRightClickUnitGrouped_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit); - - private native boolean canRightClickUnitGrouped_native(long pointer, Unit targetUnit); - - private native boolean canRightClickUnitGrouped_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped, boolean checkCommandibility); - - private native boolean canHaltConstruction_native(long pointer); - - private native boolean canHaltConstruction_native(long pointer, boolean checkCommandibility); - - private native boolean canCancelConstruction_native(long pointer); - - private native boolean canCancelConstruction_native(long pointer, boolean checkCommandibility); - - private native boolean canCancelAddon_native(long pointer); - - private native boolean canCancelAddon_native(long pointer, boolean checkCommandibility); - - private native boolean canCancelTrain_native(long pointer); - - private native boolean canCancelTrain_native(long pointer, boolean checkCommandibility); - - private native boolean canCancelTrainSlot_native(long pointer); - - private native boolean canCancelTrainSlot_native(long pointer, boolean checkCommandibility); - - private native boolean canCancelTrainSlot_native(long pointer, int slot, boolean checkCanIssueCommandType); - - private native boolean canCancelTrainSlot_native(long pointer, int slot); - - private native boolean canCancelTrainSlot_native(long pointer, int slot, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canCancelMorph_native(long pointer); - - private native boolean canCancelMorph_native(long pointer, boolean checkCommandibility); - - private native boolean canCancelResearch_native(long pointer); - - private native boolean canCancelResearch_native(long pointer, boolean checkCommandibility); - - private native boolean canCancelUpgrade_native(long pointer); - - private native boolean canCancelUpgrade_native(long pointer, boolean checkCommandibility); - - private native boolean canUseTechWithOrWithoutTarget_native(long pointer); - - private native boolean canUseTechWithOrWithoutTarget_native(long pointer, boolean checkCommandibility); - - private native boolean canUseTechWithOrWithoutTarget_native(long pointer, TechType tech, boolean checkCanIssueCommandType); - - private native boolean canUseTechWithOrWithoutTarget_native(long pointer, TechType tech); - - private native boolean canUseTechWithOrWithoutTarget_native(long pointer, TechType tech, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canUseTech_native(long pointer, TechType tech, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkTargetsType, boolean checkCanIssueCommandType); - - private native boolean canUseTech_native(long pointer, TechType tech, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkTargetsType); - - private native boolean canUseTech_native(long pointer, TechType tech, PositionOrUnit target, boolean checkCanTargetUnit); - - private native boolean canUseTech_native(long pointer, TechType tech, PositionOrUnit target); - - private native boolean canUseTech_native(long pointer, TechType tech); - - private native boolean canUseTech_native(long pointer, TechType tech, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkTargetsType, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canUseTechWithoutTarget_native(long pointer, TechType tech, boolean checkCanIssueCommandType); - - private native boolean canUseTechWithoutTarget_native(long pointer, TechType tech); - - private native boolean canUseTechWithoutTarget_native(long pointer, TechType tech, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canUseTechUnit_native(long pointer, TechType tech, boolean checkCanIssueCommandType); - - private native boolean canUseTechUnit_native(long pointer, TechType tech); - - private native boolean canUseTechUnit_native(long pointer, TechType tech, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canUseTechUnit_native(long pointer, TechType tech, Unit targetUnit, boolean checkCanTargetUnit, boolean checkTargetsUnits, boolean checkCanIssueCommandType); - - private native boolean canUseTechUnit_native(long pointer, TechType tech, Unit targetUnit, boolean checkCanTargetUnit, boolean checkTargetsUnits); - - private native boolean canUseTechUnit_native(long pointer, TechType tech, Unit targetUnit, boolean checkCanTargetUnit); - - private native boolean canUseTechUnit_native(long pointer, TechType tech, Unit targetUnit); - - private native boolean canUseTechUnit_native(long pointer, TechType tech, Unit targetUnit, boolean checkCanTargetUnit, boolean checkTargetsUnits, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canUseTechPosition_native(long pointer, TechType tech, boolean checkCanIssueCommandType); - - private native boolean canUseTechPosition_native(long pointer, TechType tech); - - private native boolean canUseTechPosition_native(long pointer, TechType tech, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canUseTechPosition_native(long pointer, TechType tech, Position target, boolean checkTargetsPositions, boolean checkCanIssueCommandType); - - private native boolean canUseTechPosition_native(long pointer, TechType tech, Position target, boolean checkTargetsPositions); - - private native boolean canUseTechPosition_native(long pointer, TechType tech, Position target); - - private native boolean canUseTechPosition_native(long pointer, TechType tech, Position target, boolean checkTargetsPositions, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canPlaceCOP_native(long pointer); - - private native boolean canPlaceCOP_native(long pointer, boolean checkCommandibility); - - private native boolean canPlaceCOP_native(long pointer, TilePosition target, boolean checkCanIssueCommandType); - - private native boolean canPlaceCOP_native(long pointer, TilePosition target); - - private native boolean canPlaceCOP_native(long pointer, TilePosition target, boolean checkCanIssueCommandType, boolean checkCommandibility); - - -} diff --git a/bwapi4/UnitCommand.java b/bwapi4/UnitCommand.java deleted file mode 100644 index 00b3d2f..0000000 --- a/bwapi4/UnitCommand.java +++ /dev/null @@ -1,219 +0,0 @@ -package bwapi4; - - -public class UnitCommand { - - public static native UnitCommand attack(Unit unit, PositionOrUnit target); - - public static native UnitCommand attack(Unit unit, PositionOrUnit target, boolean shiftQueueCommand); - - public static native UnitCommand build(Unit unit, TilePosition target, UnitType type); - - public static native UnitCommand buildAddon(Unit unit, UnitType type); - - public static native UnitCommand train(Unit unit, UnitType type); - - public static native UnitCommand morph(Unit unit, UnitType type); - - public static native UnitCommand research(Unit unit, TechType tech); - - public static native UnitCommand upgrade(Unit unit, UpgradeType upgrade); - - public static native UnitCommand setRallyPoint(Unit unit, PositionOrUnit target); - - public static native UnitCommand move(Unit unit, Position target); - - public static native UnitCommand move(Unit unit, Position target, boolean shiftQueueCommand); - - public static native UnitCommand patrol(Unit unit, Position target); - - public static native UnitCommand patrol(Unit unit, Position target, boolean shiftQueueCommand); - - public static native UnitCommand holdPosition(Unit unit); - - public static native UnitCommand holdPosition(Unit unit, boolean shiftQueueCommand); - - public static native UnitCommand stop(Unit unit); - - public static native UnitCommand stop(Unit unit, boolean shiftQueueCommand); - - public static native UnitCommand follow(Unit unit, Unit target); - - public static native UnitCommand follow(Unit unit, Unit target, boolean shiftQueueCommand); - - public static native UnitCommand gather(Unit unit, Unit target); - - public static native UnitCommand gather(Unit unit, Unit target, boolean shiftQueueCommand); - - public static native UnitCommand returnCargo(Unit unit); - - public static native UnitCommand returnCargo(Unit unit, boolean shiftQueueCommand); - - public static native UnitCommand repair(Unit unit, Unit target); - - public static native UnitCommand repair(Unit unit, Unit target, boolean shiftQueueCommand); - - public static native UnitCommand burrow(Unit unit); - - public static native UnitCommand unburrow(Unit unit); - - public static native UnitCommand cloak(Unit unit); - - public static native UnitCommand decloak(Unit unit); - - public static native UnitCommand siege(Unit unit); - - public static native UnitCommand unsiege(Unit unit); - - public static native UnitCommand lift(Unit unit); - - public static native UnitCommand land(Unit unit, TilePosition target); - - public static native UnitCommand load(Unit unit, Unit target); - - public static native UnitCommand load(Unit unit, Unit target, boolean shiftQueueCommand); - - public static native UnitCommand unload(Unit unit, Unit target); - - public static native UnitCommand unloadAll(Unit unit); - - public static native UnitCommand unloadAll(Unit unit, boolean shiftQueueCommand); - - public static native UnitCommand unloadAll(Unit unit, Position target); - - public static native UnitCommand unloadAll(Unit unit, Position target, boolean shiftQueueCommand); - - public static native UnitCommand rightClick(Unit unit, PositionOrUnit target); - - public static native UnitCommand rightClick(Unit unit, PositionOrUnit target, boolean shiftQueueCommand); - - public static native UnitCommand haltConstruction(Unit unit); - - public static native UnitCommand cancelConstruction(Unit unit); - - public static native UnitCommand cancelAddon(Unit unit); - - public static native UnitCommand cancelTrain(Unit unit); - - public static native UnitCommand cancelTrain(Unit unit, int slot); - - public static native UnitCommand cancelMorph(Unit unit); - - public static native UnitCommand cancelResearch(Unit unit); - - public static native UnitCommand cancelUpgrade(Unit unit); - - public static native UnitCommand useTech(Unit unit, TechType tech); - - public static native UnitCommand useTech(Unit unit, TechType tech, PositionOrUnit target); - - public static native UnitCommand placeCOP(Unit unit, TilePosition target); - - private Unit unit; - - private UnitCommandType unitCommandType; - - private Unit target; - - private int x, y; - - private int extra; - - private UnitCommand(Unit unit, UnitCommandType unitCommandType, Unit target, int x, int y, int extra) { - this.unit = unit; - this.unitCommandType = unitCommandType; - this.target = target; - this.x = x; - this.y = y; - this.extra = extra; - } - - public Unit getUnit() { - return unit; - } - - public UnitCommandType getUnitCommandType() { - return unitCommandType; - } - - public Unit getTarget() { - return target; - } - - - - public int getSlot() { - if (unitCommandType == UnitCommandType.None) { - return extra; - } - return -1; - } - - public Position getTargetPosition() { - if (unitCommandType == UnitCommandType.Build || - unitCommandType == UnitCommandType.Land || - unitCommandType == UnitCommandType.Place_COP) { - return new Position(x * 32, y * 32); - } - return new Position(x, y); - } - - public TilePosition getTargetTilePosition() { - if (unitCommandType == UnitCommandType.Build || - unitCommandType == UnitCommandType.Land || - unitCommandType == UnitCommandType.Place_COP) { - return new TilePosition(x, y); - } - return new TilePosition(x / 32, y / 32); - } - - public boolean isQueued() { - if (unitCommandType == UnitCommandType.Attack_Move || - unitCommandType == UnitCommandType.Attack_Unit || - unitCommandType == UnitCommandType.Move || - unitCommandType == UnitCommandType.Patrol || - unitCommandType == UnitCommandType.Hold_Position || - unitCommandType == UnitCommandType.Stop || - unitCommandType == UnitCommandType.Follow || - unitCommandType == UnitCommandType.Gather || - unitCommandType == UnitCommandType.Return_Cargo || - unitCommandType == UnitCommandType.Repair || - unitCommandType == UnitCommandType.Load || - unitCommandType == UnitCommandType.Unload_All || - unitCommandType == UnitCommandType.Unload_All_Position || - unitCommandType == UnitCommandType.Right_Click_Position || - unitCommandType == UnitCommandType.Right_Click_Unit) { - return extra != 0; - } - return false; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof UnitCommand)) return false; - - UnitCommand that = (UnitCommand) o; - - if (extra != that.extra) return false; - if (x != that.x) return false; - if (y != that.y) return false; - if (target != null ? !target.equals(that.target) : that.target != null) return false; - if (unit != null ? !unit.equals(that.unit) : that.unit != null) return false; - if (unitCommandType != null ? !unitCommandType.equals(that.unitCommandType) : that.unitCommandType != null) - return false; - - return true; - } - - @Override - public int hashCode() { - int result = unit != null ? unit.hashCode() : 0; - result = 31 * result + (unitCommandType != null ? unitCommandType.hashCode() : 0); - result = 31 * result + (target != null ? target.hashCode() : 0); - result = 31 * result + x; - result = 31 * result + y; - result = 31 * result + extra; - return result; - } -} \ No newline at end of file diff --git a/bwapi4/UnitCommandType.java b/bwapi4/UnitCommandType.java deleted file mode 100644 index e407700..0000000 --- a/bwapi4/UnitCommandType.java +++ /dev/null @@ -1,132 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class UnitCommandType { - - public String toString() { - return toString_native(pointer); - } - - public static UnitCommandType Attack_Move; - - public static UnitCommandType Attack_Unit; - - public static UnitCommandType Build; - - public static UnitCommandType Build_Addon; - - public static UnitCommandType Train; - - public static UnitCommandType Morph; - - public static UnitCommandType Research; - - public static UnitCommandType Upgrade; - - public static UnitCommandType Set_Rally_Position; - - public static UnitCommandType Set_Rally_Unit; - - public static UnitCommandType Move; - - public static UnitCommandType Patrol; - - public static UnitCommandType Hold_Position; - - public static UnitCommandType Stop; - - public static UnitCommandType Follow; - - public static UnitCommandType Gather; - - public static UnitCommandType Return_Cargo; - - public static UnitCommandType Repair; - - public static UnitCommandType Burrow; - - public static UnitCommandType Unburrow; - - public static UnitCommandType Cloak; - - public static UnitCommandType Decloak; - - public static UnitCommandType Siege; - - public static UnitCommandType Unsiege; - - public static UnitCommandType Lift; - - public static UnitCommandType Land; - - public static UnitCommandType Load; - - public static UnitCommandType Unload; - - public static UnitCommandType Unload_All; - - public static UnitCommandType Unload_All_Position; - - public static UnitCommandType Right_Click_Position; - - public static UnitCommandType Right_Click_Unit; - - public static UnitCommandType Halt_Construction; - - public static UnitCommandType Cancel_Construction; - - public static UnitCommandType Cancel_Addon; - - public static UnitCommandType Cancel_Train; - - public static UnitCommandType Cancel_Train_Slot; - - public static UnitCommandType Cancel_Morph; - - public static UnitCommandType Cancel_Research; - - public static UnitCommandType Cancel_Upgrade; - - public static UnitCommandType Use_Tech; - - public static UnitCommandType Use_Tech_Position; - - public static UnitCommandType Use_Tech_Unit; - - public static UnitCommandType Place_COP; - - public static UnitCommandType None; - - public static UnitCommandType Unknown; - - - private static Map instances = new HashMap(); - - private UnitCommandType(long pointer) { - this.pointer = pointer; - } - - private static UnitCommandType get(long pointer) { - if (pointer == 0 ) { - return null; - } - UnitCommandType instance = instances.get(pointer); - if (instance == null ) { - instance = new UnitCommandType(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String toString_native(long pointer); - - -} diff --git a/bwapi4/UnitFilter.java b/bwapi4/UnitFilter.java deleted file mode 100644 index 99f65d6..0000000 --- a/bwapi4/UnitFilter.java +++ /dev/null @@ -1,31 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class UnitFilter { - - - private static Map instances = new HashMap(); - - private UnitFilter(long pointer) { - this.pointer = pointer; - } - - private static UnitFilter get(long pointer) { - UnitFilter instance = instances.get(pointer); - if (instance == null ) { - instance = new UnitFilter(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - -} diff --git a/bwapi4/UnitSizeType.java b/bwapi4/UnitSizeType.java deleted file mode 100644 index 7633b99..0000000 --- a/bwapi4/UnitSizeType.java +++ /dev/null @@ -1,52 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class UnitSizeType { - - public String toString() { - return toString_native(pointer); - } - - public static UnitSizeType Independent; - - public static UnitSizeType Small; - - public static UnitSizeType Medium; - - public static UnitSizeType Large; - - public static UnitSizeType None; - - public static UnitSizeType Unknown; - - - private static Map instances = new HashMap(); - - private UnitSizeType(long pointer) { - this.pointer = pointer; - } - - private static UnitSizeType get(long pointer) { - if (pointer == 0 ) { - return null; - } - UnitSizeType instance = instances.get(pointer); - if (instance == null ) { - instance = new UnitSizeType(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String toString_native(long pointer); - - -} diff --git a/bwapi4/UnitType.java b/bwapi4/UnitType.java deleted file mode 100644 index ae0acc8..0000000 --- a/bwapi4/UnitType.java +++ /dev/null @@ -1,894 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class UnitType { - - public String toString() { - return toString_native(pointer); - } - - public Race getRace() { - return getRace_native(pointer); - } - - public TechType requiredTech() { - return requiredTech_native(pointer); - } - - public TechType cloakingTech() { - return cloakingTech_native(pointer); - } - - public UpgradeType armorUpgrade() { - return armorUpgrade_native(pointer); - } - - public int maxHitPoints() { - return maxHitPoints_native(pointer); - } - - public int maxShields() { - return maxShields_native(pointer); - } - - public int maxEnergy() { - return maxEnergy_native(pointer); - } - - public int armor() { - return armor_native(pointer); - } - - public int mineralPrice() { - return mineralPrice_native(pointer); - } - - public int gasPrice() { - return gasPrice_native(pointer); - } - - public int buildTime() { - return buildTime_native(pointer); - } - - public int supplyRequired() { - return supplyRequired_native(pointer); - } - - public int supplyProvided() { - return supplyProvided_native(pointer); - } - - public int spaceRequired() { - return spaceRequired_native(pointer); - } - - public int spaceProvided() { - return spaceProvided_native(pointer); - } - - public int buildScore() { - return buildScore_native(pointer); - } - - public int destroyScore() { - return destroyScore_native(pointer); - } - - public UnitSizeType size() { - return size_native(pointer); - } - - public int tileWidth() { - return tileWidth_native(pointer); - } - - public int tileHeight() { - return tileHeight_native(pointer); - } - - public TilePosition tileSize() { - return tileSize_native(pointer); - } - - public int dimensionLeft() { - return dimensionLeft_native(pointer); - } - - public int dimensionUp() { - return dimensionUp_native(pointer); - } - - public int dimensionRight() { - return dimensionRight_native(pointer); - } - - public int dimensionDown() { - return dimensionDown_native(pointer); - } - - public int width() { - return width_native(pointer); - } - - public int height() { - return height_native(pointer); - } - - public int seekRange() { - return seekRange_native(pointer); - } - - public int sightRange() { - return sightRange_native(pointer); - } - - public WeaponType groundWeapon() { - return groundWeapon_native(pointer); - } - - public int maxGroundHits() { - return maxGroundHits_native(pointer); - } - - public WeaponType airWeapon() { - return airWeapon_native(pointer); - } - - public int maxAirHits() { - return maxAirHits_native(pointer); - } - - public double topSpeed() { - return topSpeed_native(pointer); - } - - public int acceleration() { - return acceleration_native(pointer); - } - - public int haltDistance() { - return haltDistance_native(pointer); - } - - public int turnRadius() { - return turnRadius_native(pointer); - } - - public boolean canProduce() { - return canProduce_native(pointer); - } - - public boolean canAttack() { - return canAttack_native(pointer); - } - - public boolean canMove() { - return canMove_native(pointer); - } - - public boolean isFlyer() { - return isFlyer_native(pointer); - } - - public boolean regeneratesHP() { - return regeneratesHP_native(pointer); - } - - public boolean isSpellcaster() { - return isSpellcaster_native(pointer); - } - - public boolean hasPermanentCloak() { - return hasPermanentCloak_native(pointer); - } - - public boolean isInvincible() { - return isInvincible_native(pointer); - } - - public boolean isOrganic() { - return isOrganic_native(pointer); - } - - public boolean isMechanical() { - return isMechanical_native(pointer); - } - - public boolean isRobotic() { - return isRobotic_native(pointer); - } - - public boolean isDetector() { - return isDetector_native(pointer); - } - - public boolean isResourceContainer() { - return isResourceContainer_native(pointer); - } - - public boolean isResourceDepot() { - return isResourceDepot_native(pointer); - } - - public boolean isRefinery() { - return isRefinery_native(pointer); - } - - public boolean isWorker() { - return isWorker_native(pointer); - } - - public boolean requiresPsi() { - return requiresPsi_native(pointer); - } - - public boolean requiresCreep() { - return requiresCreep_native(pointer); - } - - public boolean isTwoUnitsInOneEgg() { - return isTwoUnitsInOneEgg_native(pointer); - } - - public boolean isBurrowable() { - return isBurrowable_native(pointer); - } - - public boolean isCloakable() { - return isCloakable_native(pointer); - } - - public boolean isBuilding() { - return isBuilding_native(pointer); - } - - public boolean isAddon() { - return isAddon_native(pointer); - } - - public boolean isFlyingBuilding() { - return isFlyingBuilding_native(pointer); - } - - public boolean isNeutral() { - return isNeutral_native(pointer); - } - - public boolean isHero() { - return isHero_native(pointer); - } - - public boolean isPowerup() { - return isPowerup_native(pointer); - } - - public boolean isBeacon() { - return isBeacon_native(pointer); - } - - public boolean isFlagBeacon() { - return isFlagBeacon_native(pointer); - } - - public boolean isSpecialBuilding() { - return isSpecialBuilding_native(pointer); - } - - public boolean isSpell() { - return isSpell_native(pointer); - } - - public boolean producesLarva() { - return producesLarva_native(pointer); - } - - public boolean isMineralField() { - return isMineralField_native(pointer); - } - - public boolean isCritter() { - return isCritter_native(pointer); - } - - public boolean canBuildAddon() { - return canBuildAddon_native(pointer); - } - - public static UnitType Terran_Marine; - - public static UnitType Terran_Ghost; - - public static UnitType Terran_Vulture; - - public static UnitType Terran_Goliath; - - public static UnitType Terran_Siege_Tank_Tank_Mode; - - public static UnitType Terran_SCV; - - public static UnitType Terran_Wraith; - - public static UnitType Terran_Science_Vessel; - - public static UnitType Hero_Gui_Montag; - - public static UnitType Terran_Dropship; - - public static UnitType Terran_Battlecruiser; - - public static UnitType Terran_Vulture_Spider_Mine; - - public static UnitType Terran_Nuclear_Missile; - - public static UnitType Terran_Civilian; - - public static UnitType Hero_Sarah_Kerrigan; - - public static UnitType Hero_Alan_Schezar; - - public static UnitType Hero_Jim_Raynor_Vulture; - - public static UnitType Hero_Jim_Raynor_Marine; - - public static UnitType Hero_Tom_Kazansky; - - public static UnitType Hero_Magellan; - - public static UnitType Hero_Edmund_Duke_Tank_Mode; - - public static UnitType Hero_Edmund_Duke_Siege_Mode; - - public static UnitType Hero_Arcturus_Mengsk; - - public static UnitType Hero_Hyperion; - - public static UnitType Hero_Norad_II; - - public static UnitType Terran_Siege_Tank_Siege_Mode; - - public static UnitType Terran_Firebat; - - public static UnitType Spell_Scanner_Sweep; - - public static UnitType Terran_Medic; - - public static UnitType Zerg_Larva; - - public static UnitType Zerg_Egg; - - public static UnitType Zerg_Zergling; - - public static UnitType Zerg_Hydralisk; - - public static UnitType Zerg_Ultralisk; - - public static UnitType Zerg_Broodling; - - public static UnitType Zerg_Drone; - - public static UnitType Zerg_Overlord; - - public static UnitType Zerg_Mutalisk; - - public static UnitType Zerg_Guardian; - - public static UnitType Zerg_Queen; - - public static UnitType Zerg_Defiler; - - public static UnitType Zerg_Scourge; - - public static UnitType Hero_Torrasque; - - public static UnitType Hero_Matriarch; - - public static UnitType Zerg_Infested_Terran; - - public static UnitType Hero_Infested_Kerrigan; - - public static UnitType Hero_Unclean_One; - - public static UnitType Hero_Hunter_Killer; - - public static UnitType Hero_Devouring_One; - - public static UnitType Hero_Kukulza_Mutalisk; - - public static UnitType Hero_Kukulza_Guardian; - - public static UnitType Hero_Yggdrasill; - - public static UnitType Terran_Valkyrie; - - public static UnitType Zerg_Cocoon; - - public static UnitType Protoss_Corsair; - - public static UnitType Protoss_Dark_Templar; - - public static UnitType Zerg_Devourer; - - public static UnitType Protoss_Dark_Archon; - - public static UnitType Protoss_Probe; - - public static UnitType Protoss_Zealot; - - public static UnitType Protoss_Dragoon; - - public static UnitType Protoss_High_Templar; - - public static UnitType Protoss_Archon; - - public static UnitType Protoss_Shuttle; - - public static UnitType Protoss_Scout; - - public static UnitType Protoss_Arbiter; - - public static UnitType Protoss_Carrier; - - public static UnitType Protoss_Interceptor; - - public static UnitType Hero_Dark_Templar; - - public static UnitType Hero_Zeratul; - - public static UnitType Hero_Tassadar_Zeratul_Archon; - - public static UnitType Hero_Fenix_Zealot; - - public static UnitType Hero_Fenix_Dragoon; - - public static UnitType Hero_Tassadar; - - public static UnitType Hero_Mojo; - - public static UnitType Hero_Warbringer; - - public static UnitType Hero_Gantrithor; - - public static UnitType Protoss_Reaver; - - public static UnitType Protoss_Observer; - - public static UnitType Protoss_Scarab; - - public static UnitType Hero_Danimoth; - - public static UnitType Hero_Aldaris; - - public static UnitType Hero_Artanis; - - public static UnitType Critter_Rhynadon; - - public static UnitType Critter_Bengalaas; - - public static UnitType Special_Cargo_Ship; - - public static UnitType Special_Mercenary_Gunship; - - public static UnitType Critter_Scantid; - - public static UnitType Critter_Kakaru; - - public static UnitType Critter_Ragnasaur; - - public static UnitType Critter_Ursadon; - - public static UnitType Zerg_Lurker_Egg; - - public static UnitType Hero_Raszagal; - - public static UnitType Hero_Samir_Duran; - - public static UnitType Hero_Alexei_Stukov; - - public static UnitType Special_Map_Revealer; - - public static UnitType Hero_Gerard_DuGalle; - - public static UnitType Zerg_Lurker; - - public static UnitType Hero_Infested_Duran; - - public static UnitType Spell_Disruption_Web; - - public static UnitType Terran_Command_Center; - - public static UnitType Terran_Comsat_Station; - - public static UnitType Terran_Nuclear_Silo; - - public static UnitType Terran_Supply_Depot; - - public static UnitType Terran_Refinery; - - public static UnitType Terran_Barracks; - - public static UnitType Terran_Academy; - - public static UnitType Terran_Factory; - - public static UnitType Terran_Starport; - - public static UnitType Terran_Control_Tower; - - public static UnitType Terran_Science_Facility; - - public static UnitType Terran_Covert_Ops; - - public static UnitType Terran_Physics_Lab; - - public static UnitType Terran_Machine_Shop; - - public static UnitType Terran_Engineering_Bay; - - public static UnitType Terran_Armory; - - public static UnitType Terran_Missile_Turret; - - public static UnitType Terran_Bunker; - - public static UnitType Special_Crashed_Norad_II; - - public static UnitType Special_Ion_Cannon; - - public static UnitType Powerup_Uraj_Crystal; - - public static UnitType Powerup_Khalis_Crystal; - - public static UnitType Zerg_Infested_Command_Center; - - public static UnitType Zerg_Hatchery; - - public static UnitType Zerg_Lair; - - public static UnitType Zerg_Hive; - - public static UnitType Zerg_Nydus_Canal; - - public static UnitType Zerg_Hydralisk_Den; - - public static UnitType Zerg_Defiler_Mound; - - public static UnitType Zerg_Greater_Spire; - - public static UnitType Zerg_Queens_Nest; - - public static UnitType Zerg_Evolution_Chamber; - - public static UnitType Zerg_Ultralisk_Cavern; - - public static UnitType Zerg_Spire; - - public static UnitType Zerg_Spawning_Pool; - - public static UnitType Zerg_Creep_Colony; - - public static UnitType Zerg_Spore_Colony; - - public static UnitType Zerg_Sunken_Colony; - - public static UnitType Special_Overmind_With_Shell; - - public static UnitType Special_Overmind; - - public static UnitType Zerg_Extractor; - - public static UnitType Special_Mature_Chrysalis; - - public static UnitType Special_Cerebrate; - - public static UnitType Special_Cerebrate_Daggoth; - - public static UnitType Protoss_Nexus; - - public static UnitType Protoss_Robotics_Facility; - - public static UnitType Protoss_Pylon; - - public static UnitType Protoss_Assimilator; - - public static UnitType Protoss_Observatory; - - public static UnitType Protoss_Gateway; - - public static UnitType Protoss_Photon_Cannon; - - public static UnitType Protoss_Citadel_of_Adun; - - public static UnitType Protoss_Cybernetics_Core; - - public static UnitType Protoss_Templar_Archives; - - public static UnitType Protoss_Forge; - - public static UnitType Protoss_Stargate; - - public static UnitType Special_Stasis_Cell_Prison; - - public static UnitType Protoss_Fleet_Beacon; - - public static UnitType Protoss_Arbiter_Tribunal; - - public static UnitType Protoss_Robotics_Support_Bay; - - public static UnitType Protoss_Shield_Battery; - - public static UnitType Special_Khaydarin_Crystal_Form; - - public static UnitType Special_Protoss_Temple; - - public static UnitType Special_XelNaga_Temple; - - public static UnitType Resource_Mineral_Field; - - public static UnitType Resource_Mineral_Field_Type_2; - - public static UnitType Resource_Mineral_Field_Type_3; - - public static UnitType Special_Independant_Starport; - - public static UnitType Resource_Vespene_Geyser; - - public static UnitType Special_Warp_Gate; - - public static UnitType Special_Psi_Disrupter; - - public static UnitType Special_Zerg_Beacon; - - public static UnitType Special_Terran_Beacon; - - public static UnitType Special_Protoss_Beacon; - - public static UnitType Special_Zerg_Flag_Beacon; - - public static UnitType Special_Terran_Flag_Beacon; - - public static UnitType Special_Protoss_Flag_Beacon; - - public static UnitType Special_Power_Generator; - - public static UnitType Special_Overmind_Cocoon; - - public static UnitType Spell_Dark_Swarm; - - public static UnitType Special_Floor_Missile_Trap; - - public static UnitType Special_Floor_Hatch; - - public static UnitType Special_Upper_Level_Door; - - public static UnitType Special_Right_Upper_Level_Door; - - public static UnitType Special_Pit_Door; - - public static UnitType Special_Right_Pit_Door; - - public static UnitType Special_Floor_Gun_Trap; - - public static UnitType Special_Wall_Missile_Trap; - - public static UnitType Special_Wall_Flame_Trap; - - public static UnitType Special_Right_Wall_Missile_Trap; - - public static UnitType Special_Right_Wall_Flame_Trap; - - public static UnitType Special_Start_Location; - - public static UnitType Powerup_Flag; - - public static UnitType Powerup_Young_Chrysalis; - - public static UnitType Powerup_Psi_Emitter; - - public static UnitType Powerup_Data_Disk; - - public static UnitType Powerup_Khaydarin_Crystal; - - public static UnitType Powerup_Mineral_Cluster_Type_1; - - public static UnitType Powerup_Mineral_Cluster_Type_2; - - public static UnitType Powerup_Protoss_Gas_Orb_Type_1; - - public static UnitType Powerup_Protoss_Gas_Orb_Type_2; - - public static UnitType Powerup_Zerg_Gas_Sac_Type_1; - - public static UnitType Powerup_Zerg_Gas_Sac_Type_2; - - public static UnitType Powerup_Terran_Gas_Tank_Type_1; - - public static UnitType Powerup_Terran_Gas_Tank_Type_2; - - public static UnitType None; - - public static UnitType AllUnits; - - public static UnitType Men; - - public static UnitType Buildings; - - public static UnitType Factories; - - public static UnitType Unknown; - - - private static Map instances = new HashMap(); - - private UnitType(long pointer) { - this.pointer = pointer; - } - - private static UnitType get(long pointer) { - if (pointer == 0 ) { - return null; - } - UnitType instance = instances.get(pointer); - if (instance == null ) { - instance = new UnitType(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String toString_native(long pointer); - - private native Race getRace_native(long pointer); - - private native TechType requiredTech_native(long pointer); - - private native TechType cloakingTech_native(long pointer); - - private native UpgradeType armorUpgrade_native(long pointer); - - private native int maxHitPoints_native(long pointer); - - private native int maxShields_native(long pointer); - - private native int maxEnergy_native(long pointer); - - private native int armor_native(long pointer); - - private native int mineralPrice_native(long pointer); - - private native int gasPrice_native(long pointer); - - private native int buildTime_native(long pointer); - - private native int supplyRequired_native(long pointer); - - private native int supplyProvided_native(long pointer); - - private native int spaceRequired_native(long pointer); - - private native int spaceProvided_native(long pointer); - - private native int buildScore_native(long pointer); - - private native int destroyScore_native(long pointer); - - private native UnitSizeType size_native(long pointer); - - private native int tileWidth_native(long pointer); - - private native int tileHeight_native(long pointer); - - private native TilePosition tileSize_native(long pointer); - - private native int dimensionLeft_native(long pointer); - - private native int dimensionUp_native(long pointer); - - private native int dimensionRight_native(long pointer); - - private native int dimensionDown_native(long pointer); - - private native int width_native(long pointer); - - private native int height_native(long pointer); - - private native int seekRange_native(long pointer); - - private native int sightRange_native(long pointer); - - private native WeaponType groundWeapon_native(long pointer); - - private native int maxGroundHits_native(long pointer); - - private native WeaponType airWeapon_native(long pointer); - - private native int maxAirHits_native(long pointer); - - private native double topSpeed_native(long pointer); - - private native int acceleration_native(long pointer); - - private native int haltDistance_native(long pointer); - - private native int turnRadius_native(long pointer); - - private native boolean canProduce_native(long pointer); - - private native boolean canAttack_native(long pointer); - - private native boolean canMove_native(long pointer); - - private native boolean isFlyer_native(long pointer); - - private native boolean regeneratesHP_native(long pointer); - - private native boolean isSpellcaster_native(long pointer); - - private native boolean hasPermanentCloak_native(long pointer); - - private native boolean isInvincible_native(long pointer); - - private native boolean isOrganic_native(long pointer); - - private native boolean isMechanical_native(long pointer); - - private native boolean isRobotic_native(long pointer); - - private native boolean isDetector_native(long pointer); - - private native boolean isResourceContainer_native(long pointer); - - private native boolean isResourceDepot_native(long pointer); - - private native boolean isRefinery_native(long pointer); - - private native boolean isWorker_native(long pointer); - - private native boolean requiresPsi_native(long pointer); - - private native boolean requiresCreep_native(long pointer); - - private native boolean isTwoUnitsInOneEgg_native(long pointer); - - private native boolean isBurrowable_native(long pointer); - - private native boolean isCloakable_native(long pointer); - - private native boolean isBuilding_native(long pointer); - - private native boolean isAddon_native(long pointer); - - private native boolean isFlyingBuilding_native(long pointer); - - private native boolean isNeutral_native(long pointer); - - private native boolean isHero_native(long pointer); - - private native boolean isPowerup_native(long pointer); - - private native boolean isBeacon_native(long pointer); - - private native boolean isFlagBeacon_native(long pointer); - - private native boolean isSpecialBuilding_native(long pointer); - - private native boolean isSpell_native(long pointer); - - private native boolean producesLarva_native(long pointer); - - private native boolean isMineralField_native(long pointer); - - private native boolean isCritter_native(long pointer); - - private native boolean canBuildAddon_native(long pointer); - - -} diff --git a/bwapi4/Unitset.java b/bwapi4/Unitset.java deleted file mode 100644 index 9444d33..0000000 --- a/bwapi4/Unitset.java +++ /dev/null @@ -1,358 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Unitset { - - public Position getPosition() { - return getPosition_native(pointer); - } - - public List getLoadedUnits() { - return getLoadedUnits_native(pointer); - } - - public List getInterceptors() { - return getInterceptors_native(pointer); - } - - public List getLarva() { - return getLarva_native(pointer); - } - - public boolean issueCommand(UnitCommand command) { - return issueCommand_native(pointer, command); - } - - public boolean attack(PositionOrUnit target) { - return attack_native(pointer, target); - } - - public boolean attack(PositionOrUnit target, boolean shiftQueueCommand) { - return attack_native(pointer, target, shiftQueueCommand); - } - - public boolean build(UnitType type) { - return build_native(pointer, type); - } - - public boolean build(UnitType type, TilePosition target) { - return build_native(pointer, type, target); - } - - public boolean buildAddon(UnitType type) { - return buildAddon_native(pointer, type); - } - - public boolean train(UnitType type) { - return train_native(pointer, type); - } - - public boolean morph(UnitType type) { - return morph_native(pointer, type); - } - - public boolean setRallyPoint(PositionOrUnit target) { - return setRallyPoint_native(pointer, target); - } - - public boolean move(Position target) { - return move_native(pointer, target); - } - - public boolean move(Position target, boolean shiftQueueCommand) { - return move_native(pointer, target, shiftQueueCommand); - } - - public boolean patrol(Position target) { - return patrol_native(pointer, target); - } - - public boolean patrol(Position target, boolean shiftQueueCommand) { - return patrol_native(pointer, target, shiftQueueCommand); - } - - public boolean holdPosition() { - return holdPosition_native(pointer); - } - - public boolean holdPosition(boolean shiftQueueCommand) { - return holdPosition_native(pointer, shiftQueueCommand); - } - - public boolean stop() { - return stop_native(pointer); - } - - public boolean stop(boolean shiftQueueCommand) { - return stop_native(pointer, shiftQueueCommand); - } - - public boolean follow(Unit target) { - return follow_native(pointer, target); - } - - public boolean follow(Unit target, boolean shiftQueueCommand) { - return follow_native(pointer, target, shiftQueueCommand); - } - - public boolean gather(Unit target) { - return gather_native(pointer, target); - } - - public boolean gather(Unit target, boolean shiftQueueCommand) { - return gather_native(pointer, target, shiftQueueCommand); - } - - public boolean returnCargo() { - return returnCargo_native(pointer); - } - - public boolean returnCargo(boolean shiftQueueCommand) { - return returnCargo_native(pointer, shiftQueueCommand); - } - - public boolean repair(Unit target) { - return repair_native(pointer, target); - } - - public boolean repair(Unit target, boolean shiftQueueCommand) { - return repair_native(pointer, target, shiftQueueCommand); - } - - public boolean burrow() { - return burrow_native(pointer); - } - - public boolean unburrow() { - return unburrow_native(pointer); - } - - public boolean cloak() { - return cloak_native(pointer); - } - - public boolean decloak() { - return decloak_native(pointer); - } - - public boolean siege() { - return siege_native(pointer); - } - - public boolean unsiege() { - return unsiege_native(pointer); - } - - public boolean lift() { - return lift_native(pointer); - } - - public boolean load(Unit target) { - return load_native(pointer, target); - } - - public boolean load(Unit target, boolean shiftQueueCommand) { - return load_native(pointer, target, shiftQueueCommand); - } - - public boolean unloadAll() { - return unloadAll_native(pointer); - } - - public boolean unloadAll(boolean shiftQueueCommand) { - return unloadAll_native(pointer, shiftQueueCommand); - } - - public boolean unloadAll(Position target) { - return unloadAll_native(pointer, target); - } - - public boolean unloadAll(Position target, boolean shiftQueueCommand) { - return unloadAll_native(pointer, target, shiftQueueCommand); - } - - public boolean rightClick(PositionOrUnit target) { - return rightClick_native(pointer, target); - } - - public boolean rightClick(PositionOrUnit target, boolean shiftQueueCommand) { - return rightClick_native(pointer, target, shiftQueueCommand); - } - - public boolean haltConstruction() { - return haltConstruction_native(pointer); - } - - public boolean cancelConstruction() { - return cancelConstruction_native(pointer); - } - - public boolean cancelAddon() { - return cancelAddon_native(pointer); - } - - public boolean cancelTrain() { - return cancelTrain_native(pointer); - } - - public boolean cancelTrain(int slot) { - return cancelTrain_native(pointer, slot); - } - - public boolean cancelMorph() { - return cancelMorph_native(pointer); - } - - public boolean cancelResearch() { - return cancelResearch_native(pointer); - } - - public boolean cancelUpgrade() { - return cancelUpgrade_native(pointer); - } - - public boolean useTech(TechType tech) { - return useTech_native(pointer, tech); - } - - public boolean useTech(TechType tech, PositionOrUnit target) { - return useTech_native(pointer, tech, target); - } - - - private static Map instances = new HashMap(); - - private Unitset(long pointer) { - this.pointer = pointer; - } - - private static Unitset get(long pointer) { - if (pointer == 0 ) { - return null; - } - Unitset instance = instances.get(pointer); - if (instance == null ) { - instance = new Unitset(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native Position getPosition_native(long pointer); - - private native List getLoadedUnits_native(long pointer); - - private native List getInterceptors_native(long pointer); - - private native List getLarva_native(long pointer); - - private native boolean issueCommand_native(long pointer, UnitCommand command); - - private native boolean attack_native(long pointer, PositionOrUnit target); - - private native boolean attack_native(long pointer, PositionOrUnit target, boolean shiftQueueCommand); - - private native boolean build_native(long pointer, UnitType type); - - private native boolean build_native(long pointer, UnitType type, TilePosition target); - - private native boolean buildAddon_native(long pointer, UnitType type); - - private native boolean train_native(long pointer, UnitType type); - - private native boolean morph_native(long pointer, UnitType type); - - private native boolean setRallyPoint_native(long pointer, PositionOrUnit target); - - private native boolean move_native(long pointer, Position target); - - private native boolean move_native(long pointer, Position target, boolean shiftQueueCommand); - - private native boolean patrol_native(long pointer, Position target); - - private native boolean patrol_native(long pointer, Position target, boolean shiftQueueCommand); - - private native boolean holdPosition_native(long pointer); - - private native boolean holdPosition_native(long pointer, boolean shiftQueueCommand); - - private native boolean stop_native(long pointer); - - private native boolean stop_native(long pointer, boolean shiftQueueCommand); - - private native boolean follow_native(long pointer, Unit target); - - private native boolean follow_native(long pointer, Unit target, boolean shiftQueueCommand); - - private native boolean gather_native(long pointer, Unit target); - - private native boolean gather_native(long pointer, Unit target, boolean shiftQueueCommand); - - private native boolean returnCargo_native(long pointer); - - private native boolean returnCargo_native(long pointer, boolean shiftQueueCommand); - - private native boolean repair_native(long pointer, Unit target); - - private native boolean repair_native(long pointer, Unit target, boolean shiftQueueCommand); - - private native boolean burrow_native(long pointer); - - private native boolean unburrow_native(long pointer); - - private native boolean cloak_native(long pointer); - - private native boolean decloak_native(long pointer); - - private native boolean siege_native(long pointer); - - private native boolean unsiege_native(long pointer); - - private native boolean lift_native(long pointer); - - private native boolean load_native(long pointer, Unit target); - - private native boolean load_native(long pointer, Unit target, boolean shiftQueueCommand); - - private native boolean unloadAll_native(long pointer); - - private native boolean unloadAll_native(long pointer, boolean shiftQueueCommand); - - private native boolean unloadAll_native(long pointer, Position target); - - private native boolean unloadAll_native(long pointer, Position target, boolean shiftQueueCommand); - - private native boolean rightClick_native(long pointer, PositionOrUnit target); - - private native boolean rightClick_native(long pointer, PositionOrUnit target, boolean shiftQueueCommand); - - private native boolean haltConstruction_native(long pointer); - - private native boolean cancelConstruction_native(long pointer); - - private native boolean cancelAddon_native(long pointer); - - private native boolean cancelTrain_native(long pointer); - - private native boolean cancelTrain_native(long pointer, int slot); - - private native boolean cancelMorph_native(long pointer); - - private native boolean cancelResearch_native(long pointer); - - private native boolean cancelUpgrade_native(long pointer); - - private native boolean useTech_native(long pointer, TechType tech); - - private native boolean useTech_native(long pointer, TechType tech, PositionOrUnit target); - - -} diff --git a/bwapi4/UpgradeType.java b/bwapi4/UpgradeType.java deleted file mode 100644 index 0d1e163..0000000 --- a/bwapi4/UpgradeType.java +++ /dev/null @@ -1,230 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class UpgradeType { - - public String toString() { - return toString_native(pointer); - } - - public Race getRace() { - return getRace_native(pointer); - } - - public int mineralPrice() { - return mineralPrice_native(pointer); - } - - public int mineralPrice(int level) { - return mineralPrice_native(pointer, level); - } - - public int mineralPriceFactor() { - return mineralPriceFactor_native(pointer); - } - - public int gasPrice() { - return gasPrice_native(pointer); - } - - public int gasPrice(int level) { - return gasPrice_native(pointer, level); - } - - public int gasPriceFactor() { - return gasPriceFactor_native(pointer); - } - - public int upgradeTime() { - return upgradeTime_native(pointer); - } - - public int upgradeTime(int level) { - return upgradeTime_native(pointer, level); - } - - public int upgradeTimeFactor() { - return upgradeTimeFactor_native(pointer); - } - - public int maxRepeats() { - return maxRepeats_native(pointer); - } - - public UnitType whatUpgrades() { - return whatUpgrades_native(pointer); - } - - public UnitType whatsRequired() { - return whatsRequired_native(pointer); - } - - public UnitType whatsRequired(int level) { - return whatsRequired_native(pointer, level); - } - - public static UpgradeType Terran_Infantry_Armor; - - public static UpgradeType Terran_Vehicle_Plating; - - public static UpgradeType Terran_Ship_Plating; - - public static UpgradeType Zerg_Carapace; - - public static UpgradeType Zerg_Flyer_Carapace; - - public static UpgradeType Protoss_Ground_Armor; - - public static UpgradeType Protoss_Air_Armor; - - public static UpgradeType Terran_Infantry_Weapons; - - public static UpgradeType Terran_Vehicle_Weapons; - - public static UpgradeType Terran_Ship_Weapons; - - public static UpgradeType Zerg_Melee_Attacks; - - public static UpgradeType Zerg_Missile_Attacks; - - public static UpgradeType Zerg_Flyer_Attacks; - - public static UpgradeType Protoss_Ground_Weapons; - - public static UpgradeType Protoss_Air_Weapons; - - public static UpgradeType Protoss_Plasma_Shields; - - public static UpgradeType U_238_Shells; - - public static UpgradeType Ion_Thrusters; - - public static UpgradeType Titan_Reactor; - - public static UpgradeType Ocular_Implants; - - public static UpgradeType Moebius_Reactor; - - public static UpgradeType Apollo_Reactor; - - public static UpgradeType Colossus_Reactor; - - public static UpgradeType Ventral_Sacs; - - public static UpgradeType Antennae; - - public static UpgradeType Pneumatized_Carapace; - - public static UpgradeType Metabolic_Boost; - - public static UpgradeType Adrenal_Glands; - - public static UpgradeType Muscular_Augments; - - public static UpgradeType Grooved_Spines; - - public static UpgradeType Gamete_Meiosis; - - public static UpgradeType Metasynaptic_Node; - - public static UpgradeType Singularity_Charge; - - public static UpgradeType Leg_Enhancements; - - public static UpgradeType Scarab_Damage; - - public static UpgradeType Reaver_Capacity; - - public static UpgradeType Gravitic_Drive; - - public static UpgradeType Sensor_Array; - - public static UpgradeType Gravitic_Boosters; - - public static UpgradeType Khaydarin_Amulet; - - public static UpgradeType Apial_Sensors; - - public static UpgradeType Gravitic_Thrusters; - - public static UpgradeType Carrier_Capacity; - - public static UpgradeType Khaydarin_Core; - - public static UpgradeType Argus_Jewel; - - public static UpgradeType Argus_Talisman; - - public static UpgradeType Caduceus_Reactor; - - public static UpgradeType Chitinous_Plating; - - public static UpgradeType Anabolic_Synthesis; - - public static UpgradeType Charon_Boosters; - - public static UpgradeType Upgrade_60; - - public static UpgradeType None; - - public static UpgradeType Unknown; - - - private static Map instances = new HashMap(); - - private UpgradeType(long pointer) { - this.pointer = pointer; - } - - private static UpgradeType get(long pointer) { - if (pointer == 0 ) { - return null; - } - UpgradeType instance = instances.get(pointer); - if (instance == null ) { - instance = new UpgradeType(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String toString_native(long pointer); - - private native Race getRace_native(long pointer); - - private native int mineralPrice_native(long pointer); - - private native int mineralPrice_native(long pointer, int level); - - private native int mineralPriceFactor_native(long pointer); - - private native int gasPrice_native(long pointer); - - private native int gasPrice_native(long pointer, int level); - - private native int gasPriceFactor_native(long pointer); - - private native int upgradeTime_native(long pointer); - - private native int upgradeTime_native(long pointer, int level); - - private native int upgradeTimeFactor_native(long pointer); - - private native int maxRepeats_native(long pointer); - - private native UnitType whatUpgrades_native(long pointer); - - private native UnitType whatsRequired_native(long pointer); - - private native UnitType whatsRequired_native(long pointer, int level); - - -} diff --git a/bwapi4/Utils.java b/bwapi4/Utils.java deleted file mode 100644 index 1a6154c..0000000 --- a/bwapi4/Utils.java +++ /dev/null @@ -1,52 +0,0 @@ -package bwapi4; - -import java.lang.String; -import java.lang.System; - -/** - * - */ -public class Utils { - - public static final byte Previous = 0x01; - public static final byte Cyan = 0x02; - public static final byte Yellow = 0x03; - public static final byte White = 0x04; - public static final byte Grey = 0x05; - public static final byte Red = 0x06; - public static final byte Green = 0x07; - public static final byte Red_P1 = 0x08; - public static final byte Tab = 0x09; - public static final byte Newline = 0x0A; - public static final byte Invisible_no_override = 0x0B; - public static final byte Remove_beyond = 0x0C; - public static final byte Clear_formatting = 0x0D; - public static final byte Blue = 0x0E; - public static final byte Teal = 0x0F; - public static final byte Purple = 0x10; - public static final byte Orange = 0x11; - public static final byte Right_Align = 0x12; - public static final byte Center_Align = 0x13; - public static final byte Invisible = 0x14; - public static final byte Brown = 0x15; - public static final byte White_p7 = 0x16; - public static final byte Yellow_p8 = 0x17; - public static final byte Green_p9 = 0x18; - public static final byte Brighter_Yellow = 0x19; - public static final byte Cyan_default = 0x1A; - public static final byte Pinkish = 0x1B; - public static final byte Dark_Cyan = 0x1C; - public static final byte Greygreen = 0x1D; - public static final byte Bluegrey = 0x1E; - public static final byte Turquoise = 0x1F; - - public static String formatText(String text, byte format){ - byte[] textData = text.getBytes(); - int textDataLength = text.length(); - - byte[] newTextData = new byte[textDataLength + 1]; - newTextData[0] = format; - System.arraycopy(textData, 0, newTextData, 1, textDataLength); - return new String(newTextData); - } -} \ No newline at end of file diff --git a/bwapi4/WalkPosition.java b/bwapi4/WalkPosition.java deleted file mode 100644 index 22a35f6..0000000 --- a/bwapi4/WalkPosition.java +++ /dev/null @@ -1,85 +0,0 @@ -package bwapi4; - -import java.lang.Override; -import java.util.HashMap; -import java.util.Map; - -public class WalkPosition extends AbstractPoint{ - - private int x, y; - - public WalkPosition(int x, int y) { - this.x = x; - this.y = y; - } - - public String toString() { - return "[" + x + ", " + y + "]"; - } - - public native boolean isValid(); - - public native WalkPosition makeValid(); - - public native double getDistance(WalkPosition position); - - public native int getApproxDistance(WalkPosition position); - - public native double getLength(); - - public int getX() { - return x; - } - - public int getY() { - return y; - } - - public static WalkPosition Invalid; - - public static WalkPosition None; - - public static WalkPosition Unknown; - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof WalkPosition)) return false; - - WalkPosition position = (WalkPosition) o; - - if (x != position.x) return false; - if (y != position.y) return false; - - return true; - } - - @Override - public int hashCode() { - int result = x; - result = 31 * result + y; - return result; - } - - - private static Map instances = new HashMap(); - - private WalkPosition(long pointer) { - this.pointer = pointer; - } - - private static WalkPosition get(long pointer) { - WalkPosition instance = instances.get(pointer); - if (instance == null) { - instance = new WalkPosition(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - public WalkPosition getPoint(){ - return this; - } -} \ No newline at end of file diff --git a/bwapi4/WeaponType.java b/bwapi4/WeaponType.java deleted file mode 100644 index edc5079..0000000 --- a/bwapi4/WeaponType.java +++ /dev/null @@ -1,382 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class WeaponType { - - public String toString() { - return toString_native(pointer); - } - - public TechType getTech() { - return getTech_native(pointer); - } - - public UnitType whatUses() { - return whatUses_native(pointer); - } - - public int damageAmount() { - return damageAmount_native(pointer); - } - - public int damageBonus() { - return damageBonus_native(pointer); - } - - public int damageCooldown() { - return damageCooldown_native(pointer); - } - - public int damageFactor() { - return damageFactor_native(pointer); - } - - public UpgradeType upgradeType() { - return upgradeType_native(pointer); - } - - public DamageType damageType() { - return damageType_native(pointer); - } - - public ExplosionType explosionType() { - return explosionType_native(pointer); - } - - public int minRange() { - return minRange_native(pointer); - } - - public int maxRange() { - return maxRange_native(pointer); - } - - public int innerSplashRadius() { - return innerSplashRadius_native(pointer); - } - - public int medianSplashRadius() { - return medianSplashRadius_native(pointer); - } - - public int outerSplashRadius() { - return outerSplashRadius_native(pointer); - } - - public boolean targetsAir() { - return targetsAir_native(pointer); - } - - public boolean targetsGround() { - return targetsGround_native(pointer); - } - - public boolean targetsMechanical() { - return targetsMechanical_native(pointer); - } - - public boolean targetsOrganic() { - return targetsOrganic_native(pointer); - } - - public boolean targetsNonBuilding() { - return targetsNonBuilding_native(pointer); - } - - public boolean targetsNonRobotic() { - return targetsNonRobotic_native(pointer); - } - - public boolean targetsTerrain() { - return targetsTerrain_native(pointer); - } - - public boolean targetsOrgOrMech() { - return targetsOrgOrMech_native(pointer); - } - - public boolean targetsOwn() { - return targetsOwn_native(pointer); - } - - public static WeaponType Gauss_Rifle; - - public static WeaponType Gauss_Rifle_Jim_Raynor; - - public static WeaponType C_10_Canister_Rifle; - - public static WeaponType C_10_Canister_Rifle_Sarah_Kerrigan; - - public static WeaponType C_10_Canister_Rifle_Samir_Duran; - - public static WeaponType C_10_Canister_Rifle_Infested_Duran; - - public static WeaponType C_10_Canister_Rifle_Alexei_Stukov; - - public static WeaponType Fragmentation_Grenade; - - public static WeaponType Fragmentation_Grenade_Jim_Raynor; - - public static WeaponType Spider_Mines; - - public static WeaponType Twin_Autocannons; - - public static WeaponType Twin_Autocannons_Alan_Schezar; - - public static WeaponType Hellfire_Missile_Pack; - - public static WeaponType Hellfire_Missile_Pack_Alan_Schezar; - - public static WeaponType Arclite_Cannon; - - public static WeaponType Arclite_Cannon_Edmund_Duke; - - public static WeaponType Fusion_Cutter; - - public static WeaponType Gemini_Missiles; - - public static WeaponType Gemini_Missiles_Tom_Kazansky; - - public static WeaponType Burst_Lasers; - - public static WeaponType Burst_Lasers_Tom_Kazansky; - - public static WeaponType ATS_Laser_Battery; - - public static WeaponType ATS_Laser_Battery_Hero; - - public static WeaponType ATS_Laser_Battery_Hyperion; - - public static WeaponType ATA_Laser_Battery; - - public static WeaponType ATA_Laser_Battery_Hero; - - public static WeaponType ATA_Laser_Battery_Hyperion; - - public static WeaponType Flame_Thrower; - - public static WeaponType Flame_Thrower_Gui_Montag; - - public static WeaponType Arclite_Shock_Cannon; - - public static WeaponType Arclite_Shock_Cannon_Edmund_Duke; - - public static WeaponType Longbolt_Missile; - - public static WeaponType Claws; - - public static WeaponType Claws_Devouring_One; - - public static WeaponType Claws_Infested_Kerrigan; - - public static WeaponType Needle_Spines; - - public static WeaponType Needle_Spines_Hunter_Killer; - - public static WeaponType Kaiser_Blades; - - public static WeaponType Kaiser_Blades_Torrasque; - - public static WeaponType Toxic_Spores; - - public static WeaponType Spines; - - public static WeaponType Acid_Spore; - - public static WeaponType Acid_Spore_Kukulza; - - public static WeaponType Glave_Wurm; - - public static WeaponType Glave_Wurm_Kukulza; - - public static WeaponType Seeker_Spores; - - public static WeaponType Subterranean_Tentacle; - - public static WeaponType Suicide_Infested_Terran; - - public static WeaponType Suicide_Scourge; - - public static WeaponType Particle_Beam; - - public static WeaponType Psi_Blades; - - public static WeaponType Psi_Blades_Fenix; - - public static WeaponType Phase_Disruptor; - - public static WeaponType Phase_Disruptor_Fenix; - - public static WeaponType Psi_Assault; - - public static WeaponType Psionic_Shockwave; - - public static WeaponType Psionic_Shockwave_TZ_Archon; - - public static WeaponType Dual_Photon_Blasters; - - public static WeaponType Dual_Photon_Blasters_Mojo; - - public static WeaponType Dual_Photon_Blasters_Artanis; - - public static WeaponType Anti_Matter_Missiles; - - public static WeaponType Anti_Matter_Missiles_Mojo; - - public static WeaponType Anti_Matter_Missiles_Artanis; - - public static WeaponType Phase_Disruptor_Cannon; - - public static WeaponType Phase_Disruptor_Cannon_Danimoth; - - public static WeaponType Pulse_Cannon; - - public static WeaponType STS_Photon_Cannon; - - public static WeaponType STA_Photon_Cannon; - - public static WeaponType Scarab; - - public static WeaponType Neutron_Flare; - - public static WeaponType Halo_Rockets; - - public static WeaponType Corrosive_Acid; - - public static WeaponType Subterranean_Spines; - - public static WeaponType Warp_Blades; - - public static WeaponType Warp_Blades_Hero; - - public static WeaponType Warp_Blades_Zeratul; - - public static WeaponType Independant_Laser_Battery; - - public static WeaponType Twin_Autocannons_Floor_Trap; - - public static WeaponType Hellfire_Missile_Pack_Wall_Trap; - - public static WeaponType Flame_Thrower_Wall_Trap; - - public static WeaponType Hellfire_Missile_Pack_Floor_Trap; - - public static WeaponType Yamato_Gun; - - public static WeaponType Nuclear_Strike; - - public static WeaponType Lockdown; - - public static WeaponType EMP_Shockwave; - - public static WeaponType Irradiate; - - public static WeaponType Parasite; - - public static WeaponType Spawn_Broodlings; - - public static WeaponType Ensnare; - - public static WeaponType Dark_Swarm; - - public static WeaponType Plague; - - public static WeaponType Consume; - - public static WeaponType Stasis_Field; - - public static WeaponType Psionic_Storm; - - public static WeaponType Disruption_Web; - - public static WeaponType Restoration; - - public static WeaponType Mind_Control; - - public static WeaponType Feedback; - - public static WeaponType Optical_Flare; - - public static WeaponType Maelstrom; - - public static WeaponType None; - - public static WeaponType Unknown; - - - private static Map instances = new HashMap(); - - private WeaponType(long pointer) { - this.pointer = pointer; - } - - private static WeaponType get(long pointer) { - if (pointer == 0 ) { - return null; - } - WeaponType instance = instances.get(pointer); - if (instance == null ) { - instance = new WeaponType(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String toString_native(long pointer); - - private native TechType getTech_native(long pointer); - - private native UnitType whatUses_native(long pointer); - - private native int damageAmount_native(long pointer); - - private native int damageBonus_native(long pointer); - - private native int damageCooldown_native(long pointer); - - private native int damageFactor_native(long pointer); - - private native UpgradeType upgradeType_native(long pointer); - - private native DamageType damageType_native(long pointer); - - private native ExplosionType explosionType_native(long pointer); - - private native int minRange_native(long pointer); - - private native int maxRange_native(long pointer); - - private native int innerSplashRadius_native(long pointer); - - private native int medianSplashRadius_native(long pointer); - - private native int outerSplashRadius_native(long pointer); - - private native boolean targetsAir_native(long pointer); - - private native boolean targetsGround_native(long pointer); - - private native boolean targetsMechanical_native(long pointer); - - private native boolean targetsOrganic_native(long pointer); - - private native boolean targetsNonBuilding_native(long pointer); - - private native boolean targetsNonRobotic_native(long pointer); - - private native boolean targetsTerrain_native(long pointer); - - private native boolean targetsOrgOrMech_native(long pointer); - - private native boolean targetsOwn_native(long pointer); - - -} diff --git a/compiled4/bwapi4/AIModule.class b/compiled4/bwapi4/AIModule.class deleted file mode 100644 index 047688a..0000000 Binary files a/compiled4/bwapi4/AIModule.class and /dev/null differ diff --git a/compiled4/bwapi4/AbstractPoint.class b/compiled4/bwapi4/AbstractPoint.class deleted file mode 100644 index 3ef0504..0000000 Binary files a/compiled4/bwapi4/AbstractPoint.class and /dev/null differ diff --git a/compiled4/bwapi4/BWEventListener.class b/compiled4/bwapi4/BWEventListener.class deleted file mode 100644 index 860e123..0000000 Binary files a/compiled4/bwapi4/BWEventListener.class and /dev/null differ diff --git a/compiled4/bwapi4/BestFilter.class b/compiled4/bwapi4/BestFilter.class deleted file mode 100644 index 7f9ede7..0000000 Binary files a/compiled4/bwapi4/BestFilter.class and /dev/null differ diff --git a/compiled4/bwapi4/BestUnitFilter.class b/compiled4/bwapi4/BestUnitFilter.class deleted file mode 100644 index e8e169b..0000000 Binary files a/compiled4/bwapi4/BestUnitFilter.class and /dev/null differ diff --git a/compiled4/bwapi4/Bullet.class b/compiled4/bwapi4/Bullet.class deleted file mode 100644 index 2dcaf2e..0000000 Binary files a/compiled4/bwapi4/Bullet.class and /dev/null differ diff --git a/compiled4/bwapi4/BulletType.class b/compiled4/bwapi4/BulletType.class deleted file mode 100644 index 91351c9..0000000 Binary files a/compiled4/bwapi4/BulletType.class and /dev/null differ diff --git a/compiled4/bwapi4/Bulletset.class b/compiled4/bwapi4/Bulletset.class deleted file mode 100644 index 353dc2a..0000000 Binary files a/compiled4/bwapi4/Bulletset.class and /dev/null differ diff --git a/compiled4/bwapi4/CenteredObject.class b/compiled4/bwapi4/CenteredObject.class deleted file mode 100644 index 38f785b..0000000 Binary files a/compiled4/bwapi4/CenteredObject.class and /dev/null differ diff --git a/compiled4/bwapi4/Client.class b/compiled4/bwapi4/Client.class deleted file mode 100644 index 00d3ba9..0000000 Binary files a/compiled4/bwapi4/Client.class and /dev/null differ diff --git a/compiled4/bwapi4/Color.class b/compiled4/bwapi4/Color.class deleted file mode 100644 index 91b657b..0000000 Binary files a/compiled4/bwapi4/Color.class and /dev/null differ diff --git a/compiled4/bwapi4/CommandType/Enum.class b/compiled4/bwapi4/CommandType/Enum.class deleted file mode 100644 index ecfc08d..0000000 Binary files a/compiled4/bwapi4/CommandType/Enum.class and /dev/null differ diff --git a/compiled4/bwapi4/CompareFilter.class b/compiled4/bwapi4/CompareFilter.class deleted file mode 100644 index 566d1ad..0000000 Binary files a/compiled4/bwapi4/CompareFilter.class and /dev/null differ diff --git a/compiled4/bwapi4/CoordinateType/Enum.class b/compiled4/bwapi4/CoordinateType/Enum.class deleted file mode 100644 index b7c53d8..0000000 Binary files a/compiled4/bwapi4/CoordinateType/Enum.class and /dev/null differ diff --git a/compiled4/bwapi4/DamageType.class b/compiled4/bwapi4/DamageType.class deleted file mode 100644 index 2003c26..0000000 Binary files a/compiled4/bwapi4/DamageType.class and /dev/null differ diff --git a/compiled4/bwapi4/DefaultBWListener.class b/compiled4/bwapi4/DefaultBWListener.class deleted file mode 100644 index 9d47d20..0000000 Binary files a/compiled4/bwapi4/DefaultBWListener.class and /dev/null differ diff --git a/compiled4/bwapi4/Enum/Enum.class b/compiled4/bwapi4/Enum/Enum.class deleted file mode 100644 index 8fc9113..0000000 Binary files a/compiled4/bwapi4/Enum/Enum.class and /dev/null differ diff --git a/compiled4/bwapi4/Error.class b/compiled4/bwapi4/Error.class deleted file mode 100644 index b89fa53..0000000 Binary files a/compiled4/bwapi4/Error.class and /dev/null differ diff --git a/compiled4/bwapi4/Event.class b/compiled4/bwapi4/Event.class deleted file mode 100644 index 321ad11..0000000 Binary files a/compiled4/bwapi4/Event.class and /dev/null differ diff --git a/compiled4/bwapi4/EventType/Enum.class b/compiled4/bwapi4/EventType/Enum.class deleted file mode 100644 index ea8446f..0000000 Binary files a/compiled4/bwapi4/EventType/Enum.class and /dev/null differ diff --git a/compiled4/bwapi4/ExplosionType.class b/compiled4/bwapi4/ExplosionType.class deleted file mode 100644 index cc1bd4a..0000000 Binary files a/compiled4/bwapi4/ExplosionType.class and /dev/null differ diff --git a/compiled4/bwapi4/Flag/Enum.class b/compiled4/bwapi4/Flag/Enum.class deleted file mode 100644 index 00e6ceb..0000000 Binary files a/compiled4/bwapi4/Flag/Enum.class and /dev/null differ diff --git a/compiled4/bwapi4/Force.class b/compiled4/bwapi4/Force.class deleted file mode 100644 index 73df7e3..0000000 Binary files a/compiled4/bwapi4/Force.class and /dev/null differ diff --git a/compiled4/bwapi4/Forceset.class b/compiled4/bwapi4/Forceset.class deleted file mode 100644 index b32b92d..0000000 Binary files a/compiled4/bwapi4/Forceset.class and /dev/null differ diff --git a/compiled4/bwapi4/Game.class b/compiled4/bwapi4/Game.class deleted file mode 100644 index 2778543..0000000 Binary files a/compiled4/bwapi4/Game.class and /dev/null differ diff --git a/compiled4/bwapi4/GameType.class b/compiled4/bwapi4/GameType.class deleted file mode 100644 index 590290e..0000000 Binary files a/compiled4/bwapi4/GameType.class and /dev/null differ diff --git a/compiled4/bwapi4/GameWrapper.class b/compiled4/bwapi4/GameWrapper.class deleted file mode 100644 index 4202c6c..0000000 Binary files a/compiled4/bwapi4/GameWrapper.class and /dev/null differ diff --git a/compiled4/bwapi4/InterfaceEvent.class b/compiled4/bwapi4/InterfaceEvent.class deleted file mode 100644 index f0994c9..0000000 Binary files a/compiled4/bwapi4/InterfaceEvent.class and /dev/null differ diff --git a/compiled4/bwapi4/Key.class b/compiled4/bwapi4/Key.class deleted file mode 100644 index 2ecdce5..0000000 Binary files a/compiled4/bwapi4/Key.class and /dev/null differ diff --git a/compiled4/bwapi4/Latency/Enum.class b/compiled4/bwapi4/Latency/Enum.class deleted file mode 100644 index 8c453fd..0000000 Binary files a/compiled4/bwapi4/Latency/Enum.class and /dev/null differ diff --git a/compiled4/bwapi4/Mirror$FrameCallback.class b/compiled4/bwapi4/Mirror$FrameCallback.class deleted file mode 100644 index dd0833b..0000000 Binary files a/compiled4/bwapi4/Mirror$FrameCallback.class and /dev/null differ diff --git a/compiled4/bwapi4/Mirror$JarResources.class b/compiled4/bwapi4/Mirror$JarResources.class deleted file mode 100644 index 71b664a..0000000 Binary files a/compiled4/bwapi4/Mirror$JarResources.class and /dev/null differ diff --git a/compiled4/bwapi4/Mirror.class b/compiled4/bwapi4/Mirror.class deleted file mode 100644 index 76430cf..0000000 Binary files a/compiled4/bwapi4/Mirror.class and /dev/null differ diff --git a/compiled4/bwapi4/MouseButton.class b/compiled4/bwapi4/MouseButton.class deleted file mode 100644 index d6c6757..0000000 Binary files a/compiled4/bwapi4/MouseButton.class and /dev/null differ diff --git a/compiled4/bwapi4/Order.class b/compiled4/bwapi4/Order.class deleted file mode 100644 index 74399e6..0000000 Binary files a/compiled4/bwapi4/Order.class and /dev/null differ diff --git a/compiled4/bwapi4/Player.class b/compiled4/bwapi4/Player.class deleted file mode 100644 index 582beec..0000000 Binary files a/compiled4/bwapi4/Player.class and /dev/null differ diff --git a/compiled4/bwapi4/PlayerType.class b/compiled4/bwapi4/PlayerType.class deleted file mode 100644 index e90d431..0000000 Binary files a/compiled4/bwapi4/PlayerType.class and /dev/null differ diff --git a/compiled4/bwapi4/Playerset.class b/compiled4/bwapi4/Playerset.class deleted file mode 100644 index 762e4f4..0000000 Binary files a/compiled4/bwapi4/Playerset.class and /dev/null differ diff --git a/compiled4/bwapi4/Point.class b/compiled4/bwapi4/Point.class deleted file mode 100644 index 0047a4f..0000000 Binary files a/compiled4/bwapi4/Point.class and /dev/null differ diff --git a/compiled4/bwapi4/Position.class b/compiled4/bwapi4/Position.class deleted file mode 100644 index b4d7a53..0000000 Binary files a/compiled4/bwapi4/Position.class and /dev/null differ diff --git a/compiled4/bwapi4/PositionOrUnit.class b/compiled4/bwapi4/PositionOrUnit.class deleted file mode 100644 index c044650..0000000 Binary files a/compiled4/bwapi4/PositionOrUnit.class and /dev/null differ diff --git a/compiled4/bwapi4/PositionedObject.class b/compiled4/bwapi4/PositionedObject.class deleted file mode 100644 index 68cf07d..0000000 Binary files a/compiled4/bwapi4/PositionedObject.class and /dev/null differ diff --git a/compiled4/bwapi4/Race.class b/compiled4/bwapi4/Race.class deleted file mode 100644 index 1a9569c..0000000 Binary files a/compiled4/bwapi4/Race.class and /dev/null differ diff --git a/compiled4/bwapi4/Region.class b/compiled4/bwapi4/Region.class deleted file mode 100644 index a52c607..0000000 Binary files a/compiled4/bwapi4/Region.class and /dev/null differ diff --git a/compiled4/bwapi4/Regionset.class b/compiled4/bwapi4/Regionset.class deleted file mode 100644 index 7418e17..0000000 Binary files a/compiled4/bwapi4/Regionset.class and /dev/null differ diff --git a/compiled4/bwapi4/ShapeType/Enum.class b/compiled4/bwapi4/ShapeType/Enum.class deleted file mode 100644 index 12914c3..0000000 Binary files a/compiled4/bwapi4/ShapeType/Enum.class and /dev/null differ diff --git a/compiled4/bwapi4/TechType.class b/compiled4/bwapi4/TechType.class deleted file mode 100644 index c3a6713..0000000 Binary files a/compiled4/bwapi4/TechType.class and /dev/null differ diff --git a/compiled4/bwapi4/Text/Enum.class b/compiled4/bwapi4/Text/Enum.class deleted file mode 100644 index ac36916..0000000 Binary files a/compiled4/bwapi4/Text/Enum.class and /dev/null differ diff --git a/compiled4/bwapi4/Text/Size/Enum.class b/compiled4/bwapi4/Text/Size/Enum.class deleted file mode 100644 index ed54129..0000000 Binary files a/compiled4/bwapi4/Text/Size/Enum.class and /dev/null differ diff --git a/compiled4/bwapi4/TilePosition.class b/compiled4/bwapi4/TilePosition.class deleted file mode 100644 index 3851e18..0000000 Binary files a/compiled4/bwapi4/TilePosition.class and /dev/null differ diff --git a/compiled4/bwapi4/Tournament/ActionID.class b/compiled4/bwapi4/Tournament/ActionID.class deleted file mode 100644 index aa8437c..0000000 Binary files a/compiled4/bwapi4/Tournament/ActionID.class and /dev/null differ diff --git a/compiled4/bwapi4/UnaryFilter.class b/compiled4/bwapi4/UnaryFilter.class deleted file mode 100644 index 686ac7e..0000000 Binary files a/compiled4/bwapi4/UnaryFilter.class and /dev/null differ diff --git a/compiled4/bwapi4/Unit.class b/compiled4/bwapi4/Unit.class deleted file mode 100644 index a915626..0000000 Binary files a/compiled4/bwapi4/Unit.class and /dev/null differ diff --git a/compiled4/bwapi4/UnitCommand.class b/compiled4/bwapi4/UnitCommand.class deleted file mode 100644 index d8888f1..0000000 Binary files a/compiled4/bwapi4/UnitCommand.class and /dev/null differ diff --git a/compiled4/bwapi4/UnitCommandType.class b/compiled4/bwapi4/UnitCommandType.class deleted file mode 100644 index 29ade76..0000000 Binary files a/compiled4/bwapi4/UnitCommandType.class and /dev/null differ diff --git a/compiled4/bwapi4/UnitFilter.class b/compiled4/bwapi4/UnitFilter.class deleted file mode 100644 index 54f0c44..0000000 Binary files a/compiled4/bwapi4/UnitFilter.class and /dev/null differ diff --git a/compiled4/bwapi4/UnitSizeType.class b/compiled4/bwapi4/UnitSizeType.class deleted file mode 100644 index ef038de..0000000 Binary files a/compiled4/bwapi4/UnitSizeType.class and /dev/null differ diff --git a/compiled4/bwapi4/UnitType.class b/compiled4/bwapi4/UnitType.class deleted file mode 100644 index a329cfd..0000000 Binary files a/compiled4/bwapi4/UnitType.class and /dev/null differ diff --git a/compiled4/bwapi4/Unitset.class b/compiled4/bwapi4/Unitset.class deleted file mode 100644 index 8f125cf..0000000 Binary files a/compiled4/bwapi4/Unitset.class and /dev/null differ diff --git a/compiled4/bwapi4/UpgradeType.class b/compiled4/bwapi4/UpgradeType.class deleted file mode 100644 index 4834138..0000000 Binary files a/compiled4/bwapi4/UpgradeType.class and /dev/null differ diff --git a/compiled4/bwapi4/Utils.class b/compiled4/bwapi4/Utils.class deleted file mode 100644 index 8ec0284..0000000 Binary files a/compiled4/bwapi4/Utils.class and /dev/null differ diff --git a/compiled4/bwapi4/WalkPosition.class b/compiled4/bwapi4/WalkPosition.class deleted file mode 100644 index b28de49..0000000 Binary files a/compiled4/bwapi4/WalkPosition.class and /dev/null differ diff --git a/compiled4/bwapi4/WeaponType.class b/compiled4/bwapi4/WeaponType.class deleted file mode 100644 index 9ed8c96..0000000 Binary files a/compiled4/bwapi4/WeaponType.class and /dev/null differ diff --git a/generated/bwapi4/AIModule.java b/generated/bwapi4/AIModule.java deleted file mode 100644 index ad9e0b6..0000000 --- a/generated/bwapi4/AIModule.java +++ /dev/null @@ -1,130 +0,0 @@ -package bwapi4; - -import bwapi4.BWEventListener; - -/** - * This class receives all events from Broodwar. - * To process them, receive an AIModule's instance from {@link Mirror} and call {@link #setEventListener(bwapi.BWEventListener)} - * to set you own {@link BWEventListener listener}. - * There's also a stub class ({@link DefaultBWListener}) provided, so you don't have to implement all of the methods. - */ -public class AIModule { - - AIModule(){} - - private BWEventListener eventListener; - - public void setEventListener(BWEventListener eventListener) { - this.eventListener = eventListener; - } - - public void onStart() { - if (eventListener != null) { - eventListener.onStart(); - } - } - - public void onEnd(boolean isWinner) { - if (eventListener != null) { - eventListener.onEnd(isWinner); - } - } - - public void onFrame() { - if (eventListener != null) { - eventListener.onFrame(); - } - } - - public void onSendText(String text) { - if (eventListener != null) - { - eventListener.onSendText(text); - } - } - - public void onReceiveText(Player player, String text) { - if (eventListener != null) { - eventListener.onReceiveText(player, text); - } - } - - public void onPlayerLeft(Player player) { - if (eventListener != null) { - eventListener.onPlayerLeft(player); - } - } - - public void onNukeDetect(Position target) { - if (eventListener != null) { - eventListener.onNukeDetect(target); - } - } - - public void onUnitDiscover(Unit unit) { - if (eventListener != null) { - eventListener.onUnitDiscover(unit); - } - } - - public void onUnitEvade(Unit unit) { - if (eventListener != null) { - eventListener.onUnitEvade(unit); - } - } - - public void onUnitShow(Unit unit) { - if (eventListener != null) { - eventListener.onUnitShow(unit); - } - } - - public void onUnitHide(Unit unit) { - if (eventListener != null) { - eventListener.onUnitHide(unit); - } - } - - public void onUnitCreate(Unit unit) { - if (eventListener != null) { - eventListener.onUnitCreate(unit); - } - } - - public void onUnitDestroy(Unit unit) { - if (eventListener != null) { - eventListener.onUnitDestroy(unit); - } - } - - public void onUnitMorph(Unit unit) { - if (eventListener != null) { - eventListener.onUnitMorph(unit); - } - } - - public void onUnitRenegade(Unit unit) { - if (eventListener != null) { - eventListener.onUnitRenegade(unit); - } - } - - public void onSaveGame(String gameName) { - if (eventListener != null) { - eventListener.onSaveGame(gameName); - } - } - - public void onUnitComplete(Unit unit) { - if (eventListener != null) { - eventListener.onUnitComplete(unit); - } - } - - public void onPlayerDropped(Player player) { - if (eventListener != null) { - eventListener.onPlayerDropped(player); - } - } - -} diff --git a/generated/bwapi4/AbstractPoint.java b/generated/bwapi4/AbstractPoint.java deleted file mode 100644 index df6fb93..0000000 --- a/generated/bwapi4/AbstractPoint.java +++ /dev/null @@ -1,30 +0,0 @@ -package bwapi4; - -/** - * Common ancestor for location based objects to simplify distance computation. - * This will be refactored into interface with default methods when java 8 becomes widely used. - * - * Idea by Rafa³ Poniatowski - */ -public abstract class AbstractPoint { - - public abstract T getPoint(); - - public int getX(){ - return getPoint().getX(); - } - - public int getY(){ - return getPoint().getY(); - } - - public double getDistance(AbstractPoint otherPosition) { - return getDistance(otherPosition.getX(), otherPosition.getY()); - } - - public double getDistance(int x, int y) { - double dx = x - getX(); - double dy = y - getY(); - return Math.sqrt(dx * dx + dy * dy); - } -} \ No newline at end of file diff --git a/generated/bwapi4/BWEventListener.java b/generated/bwapi4/BWEventListener.java deleted file mode 100644 index 6f9f031..0000000 --- a/generated/bwapi4/BWEventListener.java +++ /dev/null @@ -1,53 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -/** - * Implement this interface and call {@link AIModule#setEventListener(bwapi.BWEventListener)} to receive all of the in game events. - */ -public interface BWEventListener { - - public void onStart(); - - public void onEnd(boolean isWinner); - - public void onFrame(); - - public void onSendText(String text); - - public void onReceiveText(Player player, String text); - - public void onPlayerLeft(Player player); - - public void onNukeDetect(Position target); - - public void onUnitDiscover(Unit unit); - - public void onUnitEvade(Unit unit); - - public void onUnitShow(Unit unit); - - public void onUnitHide(Unit unit); - - public void onUnitCreate(Unit unit); - - public void onUnitDestroy(Unit unit); - - public void onUnitMorph(Unit unit); - - public void onUnitRenegade(Unit unit); - - public void onSaveGame(String gameName); - - public void onUnitComplete(Unit unit); - - public void onPlayerDropped(Player player); - -} - - diff --git a/generated/bwapi4/BestFilter.java b/generated/bwapi4/BestFilter.java deleted file mode 100644 index 76c858f..0000000 --- a/generated/bwapi4/BestFilter.java +++ /dev/null @@ -1,34 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class BestFilter { - - - private static Map instances = new HashMap(); - - private BestFilter(long pointer) { - this.pointer = pointer; - } - - private static BestFilter get(long pointer) { - if (pointer == 0 ) { - return null; - } - BestFilter instance = instances.get(pointer); - if (instance == null ) { - instance = new BestFilter(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - -} diff --git a/generated/bwapi4/BestUnitFilter.java b/generated/bwapi4/BestUnitFilter.java deleted file mode 100644 index 4a90ead..0000000 --- a/generated/bwapi4/BestUnitFilter.java +++ /dev/null @@ -1,31 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class BestUnitFilter { - - - private static Map instances = new HashMap(); - - private BestUnitFilter(long pointer) { - this.pointer = pointer; - } - - private static BestUnitFilter get(long pointer) { - BestUnitFilter instance = instances.get(pointer); - if (instance == null ) { - instance = new BestUnitFilter(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - -} diff --git a/generated/bwapi4/Bullet.java b/generated/bwapi4/Bullet.java deleted file mode 100644 index 36f2d48..0000000 --- a/generated/bwapi4/Bullet.java +++ /dev/null @@ -1,118 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Bullet { - - public int getID() { - return getID_native(pointer); - } - - public boolean exists() { - return exists_native(pointer); - } - - public Player getPlayer() { - return getPlayer_native(pointer); - } - - public BulletType getType() { - return getType_native(pointer); - } - - public Unit getSource() { - return getSource_native(pointer); - } - - public Position getPosition() { - return getPosition_native(pointer); - } - - public double getAngle() { - return getAngle_native(pointer); - } - - public double getVelocityX() { - return getVelocityX_native(pointer); - } - - public double getVelocityY() { - return getVelocityY_native(pointer); - } - - public Unit getTarget() { - return getTarget_native(pointer); - } - - public Position getTargetPosition() { - return getTargetPosition_native(pointer); - } - - public int getRemoveTimer() { - return getRemoveTimer_native(pointer); - } - - public boolean isVisible() { - return isVisible_native(pointer); - } - - public boolean isVisible(Player player) { - return isVisible_native(pointer, player); - } - - - private static Map instances = new HashMap(); - - private Bullet(long pointer) { - this.pointer = pointer; - } - - private static Bullet get(long pointer) { - if (pointer == 0 ) { - return null; - } - Bullet instance = instances.get(pointer); - if (instance == null ) { - instance = new Bullet(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native int getID_native(long pointer); - - private native boolean exists_native(long pointer); - - private native Player getPlayer_native(long pointer); - - private native BulletType getType_native(long pointer); - - private native Unit getSource_native(long pointer); - - private native Position getPosition_native(long pointer); - - private native double getAngle_native(long pointer); - - private native double getVelocityX_native(long pointer); - - private native double getVelocityY_native(long pointer); - - private native Unit getTarget_native(long pointer); - - private native Position getTargetPosition_native(long pointer); - - private native int getRemoveTimer_native(long pointer); - - private native boolean isVisible_native(long pointer); - - private native boolean isVisible_native(long pointer, Player player); - - -} diff --git a/generated/bwapi4/BulletType.java b/generated/bwapi4/BulletType.java deleted file mode 100644 index 0dc217d..0000000 --- a/generated/bwapi4/BulletType.java +++ /dev/null @@ -1,114 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class BulletType { - - public String toString() { - return toString_native(pointer); - } - - public static BulletType Melee; - - public static BulletType Fusion_Cutter_Hit; - - public static BulletType Gauss_Rifle_Hit; - - public static BulletType C_10_Canister_Rifle_Hit; - - public static BulletType Gemini_Missiles; - - public static BulletType Fragmentation_Grenade; - - public static BulletType Longbolt_Missile; - - public static BulletType ATS_ATA_Laser_Battery; - - public static BulletType Burst_Lasers; - - public static BulletType Arclite_Shock_Cannon_Hit; - - public static BulletType EMP_Missile; - - public static BulletType Dual_Photon_Blasters_Hit; - - public static BulletType Particle_Beam_Hit; - - public static BulletType Anti_Matter_Missile; - - public static BulletType Pulse_Cannon; - - public static BulletType Psionic_Shockwave_Hit; - - public static BulletType Psionic_Storm; - - public static BulletType Yamato_Gun; - - public static BulletType Phase_Disruptor; - - public static BulletType STA_STS_Cannon_Overlay; - - public static BulletType Sunken_Colony_Tentacle; - - public static BulletType Acid_Spore; - - public static BulletType Glave_Wurm; - - public static BulletType Seeker_Spores; - - public static BulletType Queen_Spell_Carrier; - - public static BulletType Plague_Cloud; - - public static BulletType Consume; - - public static BulletType Ensnare; - - public static BulletType Needle_Spine_Hit; - - public static BulletType Invisible; - - public static BulletType Optical_Flare_Grenade; - - public static BulletType Halo_Rockets; - - public static BulletType Subterranean_Spines; - - public static BulletType Corrosive_Acid_Shot; - - public static BulletType Neutron_Flare; - - public static BulletType None; - - public static BulletType Unknown; - - - private static Map instances = new HashMap(); - - private BulletType(long pointer) { - this.pointer = pointer; - } - - private static BulletType get(long pointer) { - if (pointer == 0 ) { - return null; - } - BulletType instance = instances.get(pointer); - if (instance == null ) { - instance = new BulletType(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String toString_native(long pointer); - - -} diff --git a/generated/bwapi4/Bulletset.java b/generated/bwapi4/Bulletset.java deleted file mode 100644 index 7921ecd..0000000 --- a/generated/bwapi4/Bulletset.java +++ /dev/null @@ -1,34 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Bulletset { - - - private static Map instances = new HashMap(); - - private Bulletset(long pointer) { - this.pointer = pointer; - } - - private static Bulletset get(long pointer) { - if (pointer == 0 ) { - return null; - } - Bulletset instance = instances.get(pointer); - if (instance == null ) { - instance = new Bulletset(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - -} diff --git a/generated/bwapi4/CenteredObject.java b/generated/bwapi4/CenteredObject.java deleted file mode 100644 index 2a200ac..0000000 --- a/generated/bwapi4/CenteredObject.java +++ /dev/null @@ -1,15 +0,0 @@ -package bwapi4; - -import bwapi4.Position; - -/** - * Interrmediate class used to translate getPoint() calls to getCenter() calls. - */ -public abstract class CenteredObject extends AbstractPoint { - - public Position getPoint(){ - return getCenter(); - } - - public abstract Position getCenter(); -} \ No newline at end of file diff --git a/generated/bwapi4/Client.java b/generated/bwapi4/Client.java deleted file mode 100644 index 6ea52ec..0000000 --- a/generated/bwapi4/Client.java +++ /dev/null @@ -1,58 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Client { - - public boolean isConnected() { - return isConnected_native(pointer); - } - - public boolean connect() { - return connect_native(pointer); - } - - public void disconnect() { - disconnect_native(pointer); - } - - public void update() { - update_native(pointer); - } - - - private static Map instances = new HashMap(); - - private Client(long pointer) { - this.pointer = pointer; - } - - private static Client get(long pointer) { - if (pointer == 0 ) { - return null; - } - Client instance = instances.get(pointer); - if (instance == null ) { - instance = new Client(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native boolean isConnected_native(long pointer); - - private native boolean connect_native(long pointer); - - private native void disconnect_native(long pointer); - - private native void update_native(long pointer); - - -} diff --git a/generated/bwapi4/Color.java b/generated/bwapi4/Color.java deleted file mode 100644 index e15c22a..0000000 --- a/generated/bwapi4/Color.java +++ /dev/null @@ -1,73 +0,0 @@ -package bwapi4; - -import java.lang.Override; -import java.util.HashMap; -import java.util.Map; - -/** - * Starcraft uses a 256 color palette to render everything, - * so the colors available for draw shapes using BWAPI is limited to the colors available in the Pallete. - * Several predefined colors from the pallete are provided. - */ -public class Color { - - private int r, g, b; - - /** - * Create a color using the color in the palette that is closest to the RGB color specified. This will check a number of colors in the pallet to see which is closest to the specified color so this function is relatively slow. - * @param r - * @param g - * @param b - */ - public Color(int r, int g, int b) { - this.r = r; - this.g = g; - this.b = b; - } - - public static Color Red; - - public static Color Blue; - - public static Color Teal; - - public static Color Purple; - - public static Color Orange; - - public static Color Brown; - - public static Color White; - - public static Color Yellow; - - public static Color Green; - - public static Color Cyan; - - public static Color Black; - - public static Color Grey; - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof Color)) return false; - - Color color = (Color) o; - - if (b != color.b) return false; - if (g != color.g) return false; - if (r != color.r) return false; - - return true; - } - - @Override - public int hashCode() { - int result = r; - result = 31 * result + g; - result = 31 * result + b; - return result; - } -} diff --git a/generated/bwapi4/CommandType/Enum.java b/generated/bwapi4/CommandType/Enum.java deleted file mode 100644 index b379559..0000000 --- a/generated/bwapi4/CommandType/Enum.java +++ /dev/null @@ -1,41 +0,0 @@ -package bwapi4.CommandType; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public enum Enum { - - None(0), - SetScreenPosition(1), - PingMinimap(2), - EnableFlag(3), - Printf(4), - SendText(5), - PauseGame(6), - ResumeGame(7), - LeaveGame(8), - RestartGame(9), - SetLocalSpeed(10), - SetLatCom(11), - SetGui(12), - SetFrameSkip(13), - SetMap(14), - SetAllies(15), - SetVision(16), - SetCommandOptimizerLevel(17); - - private int value; - - public int getValue(){ - return value; - } - - Enum(int value){ - this.value = value; - } - -} diff --git a/generated/bwapi4/CompareFilter.java b/generated/bwapi4/CompareFilter.java deleted file mode 100644 index c4fa5a6..0000000 --- a/generated/bwapi4/CompareFilter.java +++ /dev/null @@ -1,34 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class CompareFilter { - - - private static Map instances = new HashMap(); - - private CompareFilter(long pointer) { - this.pointer = pointer; - } - - private static CompareFilter get(long pointer) { - if (pointer == 0 ) { - return null; - } - CompareFilter instance = instances.get(pointer); - if (instance == null ) { - instance = new CompareFilter(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - -} diff --git a/generated/bwapi4/CoordinateType/Enum.java b/generated/bwapi4/CoordinateType/Enum.java deleted file mode 100644 index 4c5bce5..0000000 --- a/generated/bwapi4/CoordinateType/Enum.java +++ /dev/null @@ -1,27 +0,0 @@ -package bwapi4.CoordinateType; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public enum Enum { - - None(0), - Screen(1), - Map(2), - Mouse(3); - - private int value; - - public int getValue(){ - return value; - } - - Enum(int value){ - this.value = value; - } - -} diff --git a/generated/bwapi4/DamageType.java b/generated/bwapi4/DamageType.java deleted file mode 100644 index 135d2ea..0000000 --- a/generated/bwapi4/DamageType.java +++ /dev/null @@ -1,54 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class DamageType { - - public String toString() { - return toString_native(pointer); - } - - public static DamageType Independent; - - public static DamageType Explosive; - - public static DamageType Concussive; - - public static DamageType Normal; - - public static DamageType Ignore_Armor; - - public static DamageType None; - - public static DamageType Unknown; - - - private static Map instances = new HashMap(); - - private DamageType(long pointer) { - this.pointer = pointer; - } - - private static DamageType get(long pointer) { - if (pointer == 0 ) { - return null; - } - DamageType instance = instances.get(pointer); - if (instance == null ) { - instance = new DamageType(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String toString_native(long pointer); - - -} diff --git a/generated/bwapi4/DefaultBWListener.java b/generated/bwapi4/DefaultBWListener.java deleted file mode 100644 index 76df50e..0000000 --- a/generated/bwapi4/DefaultBWListener.java +++ /dev/null @@ -1,103 +0,0 @@ -package bwapi4; - -import bwapi4.BWEventListener; -import bwapi4.Player; -import bwapi4.Position; -import bwapi4.Unit; - -/** - * A utility stub class providing a default implementation of {@link BWEventListener}, - * override it's methods if you want to handle only some events. - */ -public class DefaultBWListener implements BWEventListener { - - @Override - public void onStart() { - - } - - @Override - public void onEnd(boolean b) { - - } - - @Override - public void onFrame() { - - } - - @Override - public void onSendText(String s) { - - } - - @Override - public void onReceiveText(Player player, String s) { - - } - - @Override - public void onPlayerLeft(Player player) { - - } - - @Override - public void onNukeDetect(Position position) { - - } - - @Override - public void onUnitDiscover(Unit unit) { - - } - - @Override - public void onUnitEvade(Unit unit) { - - } - - @Override - public void onUnitShow(Unit unit) { - - } - - @Override - public void onUnitHide(Unit unit) { - - } - - @Override - public void onUnitCreate(Unit unit) { - - } - - @Override - public void onUnitDestroy(Unit unit) { - - } - - @Override - public void onUnitMorph(Unit unit) { - - } - - @Override - public void onUnitRenegade(Unit unit) { - - } - - @Override - public void onSaveGame(String s) { - - } - - @Override - public void onUnitComplete(Unit unit) { - - } - - @Override - public void onPlayerDropped(Player player) { - - } -} diff --git a/generated/bwapi4/Enum/Enum.java b/generated/bwapi4/Enum/Enum.java deleted file mode 100644 index a655dc1..0000000 --- a/generated/bwapi4/Enum/Enum.java +++ /dev/null @@ -1,126 +0,0 @@ -package bwapi4.Enum; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public enum Enum { - - Gauss_Rifle(0), - Gauss_Rifle_Jim_Raynor(1), - C_10_Canister_Rifle(2), - C_10_Canister_Rifle_Sarah_Kerrigan(3), - Fragmentation_Grenade(4), - Fragmentation_Grenade_Jim_Raynor(5), - Spider_Mines(6), - Twin_Autocannons(7), - Hellfire_Missile_Pack(8), - Twin_Autocannons_Alan_Schezar(9), - Hellfire_Missile_Pack_Alan_Schezar(10), - Arclite_Cannon(11), - Arclite_Cannon_Edmund_Duke(12), - Fusion_Cutter(13), - Gemini_Missiles(15), - Burst_Lasers(16), - Gemini_Missiles_Tom_Kazansky(17), - Burst_Lasers_Tom_Kazansky(18), - ATS_Laser_Battery(19), - ATA_Laser_Battery(20), - ATS_Laser_Battery_Hero(21), - ATA_Laser_Battery_Hero(22), - ATS_Laser_Battery_Hyperion(23), - ATA_Laser_Battery_Hyperion(24), - Flame_Thrower(25), - Flame_Thrower_Gui_Montag(26), - Arclite_Shock_Cannon(27), - Arclite_Shock_Cannon_Edmund_Duke(28), - Longbolt_Missile(29), - Yamato_Gun(30), - Nuclear_Strike(31), - Lockdown(32), - EMP_Shockwave(33), - Irradiate(34), - Claws(35), - Claws_Devouring_One(36), - Claws_Infested_Kerrigan(37), - Needle_Spines(38), - Needle_Spines_Hunter_Killer(39), - Kaiser_Blades(40), - Kaiser_Blades_Torrasque(41), - Toxic_Spores(42), - Spines(43), - Acid_Spore(46), - Acid_Spore_Kukulza(47), - Glave_Wurm(48), - Glave_Wurm_Kukulza(49), - Seeker_Spores(52), - Subterranean_Tentacle(53), - Suicide_Infested_Terran(54), - Suicide_Scourge(55), - Parasite(56), - Spawn_Broodlings(57), - Ensnare(58), - Dark_Swarm(59), - Plague(60), - Consume(61), - Particle_Beam(62), - Psi_Blades(64), - Psi_Blades_Fenix(65), - Phase_Disruptor(66), - Phase_Disruptor_Fenix(67), - Psi_Assault(69), - Psionic_Shockwave(70), - Psionic_Shockwave_TZ_Archon(71), - Dual_Photon_Blasters(73), - Anti_Matter_Missiles(74), - Dual_Photon_Blasters_Mojo(75), - Anti_Matter_Missiles_Mojo(76), - Phase_Disruptor_Cannon(77), - Phase_Disruptor_Cannon_Danimoth(78), - Pulse_Cannon(79), - STS_Photon_Cannon(80), - STA_Photon_Cannon(81), - Scarab(82), - Stasis_Field(83), - Psionic_Storm(84), - Warp_Blades_Zeratul(85), - Warp_Blades_Hero(86), - Platform_Laser_Battery(92), - Independant_Laser_Battery(93), - Twin_Autocannons_Floor_Trap(96), - Hellfire_Missile_Pack_Wall_Trap(97), - Flame_Thrower_Wall_Trap(98), - Hellfire_Missile_Pack_Floor_Trap(99), - Neutron_Flare(100), - Disruption_Web(101), - Restoration(102), - Halo_Rockets(103), - Corrosive_Acid(104), - Mind_Control(105), - Feedback(106), - Optical_Flare(107), - Maelstrom(108), - Subterranean_Spines(109), - Warp_Blades(111), - C_10_Canister_Rifle_Samir_Duran(112), - C_10_Canister_Rifle_Infested_Duran(113), - Dual_Photon_Blasters_Artanis(114), - Anti_Matter_Missiles_Artanis(115), - C_10_Canister_Rifle_Alexei_Stukov(116), - None(130), - Unknown(131); - - private int value; - - public int getValue(){ - return value; - } - - Enum(int value){ - this.value = value; - } - -} diff --git a/generated/bwapi4/Error.java b/generated/bwapi4/Error.java deleted file mode 100644 index 29412a9..0000000 --- a/generated/bwapi4/Error.java +++ /dev/null @@ -1,96 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Error { - - public String toString() { - return toString_native(pointer); - } - - public static Error Unit_Does_Not_Exist; - - public static Error Unit_Not_Visible; - - public static Error Unit_Not_Owned; - - public static Error Unit_Busy; - - public static Error Incompatible_UnitType; - - public static Error Incompatible_TechType; - - public static Error Incompatible_State; - - public static Error Already_Researched; - - public static Error Fully_Upgraded; - - public static Error Currently_Researching; - - public static Error Currently_Upgrading; - - public static Error Insufficient_Minerals; - - public static Error Insufficient_Gas; - - public static Error Insufficient_Supply; - - public static Error Insufficient_Energy; - - public static Error Insufficient_Tech; - - public static Error Insufficient_Ammo; - - public static Error Insufficient_Space; - - public static Error Invalid_Tile_Position; - - public static Error Unbuildable_Location; - - public static Error Unreachable_Location; - - public static Error Out_Of_Range; - - public static Error Unable_To_Hit; - - public static Error Access_Denied; - - public static Error File_Not_Found; - - public static Error Invalid_Parameter; - - public static Error None; - - public static Error Unknown; - - - private static Map instances = new HashMap(); - - private Error(long pointer) { - this.pointer = pointer; - } - - private static Error get(long pointer) { - if (pointer == 0 ) { - return null; - } - Error instance = instances.get(pointer); - if (instance == null ) { - instance = new Error(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String toString_native(long pointer); - - -} diff --git a/generated/bwapi4/Event.java b/generated/bwapi4/Event.java deleted file mode 100644 index 362ca82..0000000 --- a/generated/bwapi4/Event.java +++ /dev/null @@ -1,64 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Event { - - public Position getPosition() { - return getPosition_native(pointer); - } - - public String getText() { - return getText_native(pointer); - } - - public Unit getUnit() { - return getUnit_native(pointer); - } - - public Player getPlayer() { - return getPlayer_native(pointer); - } - - public boolean isWinner() { - return isWinner_native(pointer); - } - - - private static Map instances = new HashMap(); - - private Event(long pointer) { - this.pointer = pointer; - } - - private static Event get(long pointer) { - if (pointer == 0 ) { - return null; - } - Event instance = instances.get(pointer); - if (instance == null ) { - instance = new Event(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native Position getPosition_native(long pointer); - - private native String getText_native(long pointer); - - private native Unit getUnit_native(long pointer); - - private native Player getPlayer_native(long pointer); - - private native boolean isWinner_native(long pointer); - - -} diff --git a/generated/bwapi4/EventType/Enum.java b/generated/bwapi4/EventType/Enum.java deleted file mode 100644 index 6173e74..0000000 --- a/generated/bwapi4/EventType/Enum.java +++ /dev/null @@ -1,41 +0,0 @@ -package bwapi4.EventType; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public enum Enum { - - MatchStart(0), - MatchEnd(1), - MatchFrame(2), - MenuFrame(3), - SendText(4), - ReceiveText(5), - PlayerLeft(6), - NukeDetect(7), - UnitDiscover(8), - UnitEvade(9), - UnitShow(10), - UnitHide(11), - UnitCreate(12), - UnitDestroy(13), - UnitMorph(14), - UnitRenegade(15), - SaveGame(16), - UnitComplete(17); - - private int value; - - public int getValue(){ - return value; - } - - Enum(int value){ - this.value = value; - } - -} diff --git a/generated/bwapi4/ExplosionType.java b/generated/bwapi4/ExplosionType.java deleted file mode 100644 index 7fdca74..0000000 --- a/generated/bwapi4/ExplosionType.java +++ /dev/null @@ -1,90 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class ExplosionType { - - public String toString() { - return toString_native(pointer); - } - - public static ExplosionType None; - - public static ExplosionType Normal; - - public static ExplosionType Radial_Splash; - - public static ExplosionType Enemy_Splash; - - public static ExplosionType Lockdown; - - public static ExplosionType Nuclear_Missile; - - public static ExplosionType Parasite; - - public static ExplosionType Broodlings; - - public static ExplosionType EMP_Shockwave; - - public static ExplosionType Irradiate; - - public static ExplosionType Ensnare; - - public static ExplosionType Plague; - - public static ExplosionType Stasis_Field; - - public static ExplosionType Dark_Swarm; - - public static ExplosionType Consume; - - public static ExplosionType Yamato_Gun; - - public static ExplosionType Restoration; - - public static ExplosionType Disruption_Web; - - public static ExplosionType Corrosive_Acid; - - public static ExplosionType Mind_Control; - - public static ExplosionType Feedback; - - public static ExplosionType Optical_Flare; - - public static ExplosionType Maelstrom; - - public static ExplosionType Air_Splash; - - public static ExplosionType Unknown; - - - private static Map instances = new HashMap(); - - private ExplosionType(long pointer) { - this.pointer = pointer; - } - - private static ExplosionType get(long pointer) { - if (pointer == 0 ) { - return null; - } - ExplosionType instance = instances.get(pointer); - if (instance == null ) { - instance = new ExplosionType(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String toString_native(long pointer); - - -} diff --git a/generated/bwapi4/Flag/Enum.java b/generated/bwapi4/Flag/Enum.java deleted file mode 100644 index cdbf3d4..0000000 --- a/generated/bwapi4/Flag/Enum.java +++ /dev/null @@ -1,25 +0,0 @@ -package bwapi4.Flag; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public enum Enum { - - CompleteMapInformation(0), - UserInput(1); - - private int value; - - public int getValue(){ - return value; - } - - Enum(int value){ - this.value = value; - } - -} diff --git a/generated/bwapi4/Force.java b/generated/bwapi4/Force.java deleted file mode 100644 index 0a46073..0000000 --- a/generated/bwapi4/Force.java +++ /dev/null @@ -1,52 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Force { - - public int getID() { - return getID_native(pointer); - } - - public String getName() { - return getName_native(pointer); - } - - public List getPlayers() { - return getPlayers_native(pointer); - } - - - private static Map instances = new HashMap(); - - private Force(long pointer) { - this.pointer = pointer; - } - - private static Force get(long pointer) { - if (pointer == 0 ) { - return null; - } - Force instance = instances.get(pointer); - if (instance == null ) { - instance = new Force(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native int getID_native(long pointer); - - private native String getName_native(long pointer); - - private native List getPlayers_native(long pointer); - - -} diff --git a/generated/bwapi4/Forceset.java b/generated/bwapi4/Forceset.java deleted file mode 100644 index cb4b362..0000000 --- a/generated/bwapi4/Forceset.java +++ /dev/null @@ -1,40 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Forceset { - - public List getPlayers() { - return getPlayers_native(pointer); - } - - - private static Map instances = new HashMap(); - - private Forceset(long pointer) { - this.pointer = pointer; - } - - private static Forceset get(long pointer) { - if (pointer == 0 ) { - return null; - } - Forceset instance = instances.get(pointer); - if (instance == null ) { - instance = new Forceset(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native List getPlayers_native(long pointer); - - -} diff --git a/generated/bwapi4/Game.java b/generated/bwapi4/Game.java deleted file mode 100644 index 196543b..0000000 --- a/generated/bwapi4/Game.java +++ /dev/null @@ -1,1330 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Game { - - public List getForces() { - return getForces_native(pointer); - } - - public List getPlayers() { - return getPlayers_native(pointer); - } - - public List getAllUnits() { - return getAllUnits_native(pointer); - } - - public List getMinerals() { - return getMinerals_native(pointer); - } - - public List getGeysers() { - return getGeysers_native(pointer); - } - - public List getNeutralUnits() { - return getNeutralUnits_native(pointer); - } - - public List getStaticMinerals() { - return getStaticMinerals_native(pointer); - } - - public List getStaticGeysers() { - return getStaticGeysers_native(pointer); - } - - public List getStaticNeutralUnits() { - return getStaticNeutralUnits_native(pointer); - } - - public List getBullets() { - return getBullets_native(pointer); - } - - public Force getForce(int forceID) { - return getForce_native(pointer, forceID); - } - - public Player getPlayer(int playerID) { - return getPlayer_native(pointer, playerID); - } - - public Unit getUnit(int unitID) { - return getUnit_native(pointer, unitID); - } - - public Unit indexToUnit(int unitIndex) { - return indexToUnit_native(pointer, unitIndex); - } - - public Region getRegion(int regionID) { - return getRegion_native(pointer, regionID); - } - - public GameType getGameType() { - return getGameType_native(pointer); - } - - public int getLatency() { - return getLatency_native(pointer); - } - - public int getFrameCount() { - return getFrameCount_native(pointer); - } - - public int getReplayFrameCount() { - return getReplayFrameCount_native(pointer); - } - - public int getFPS() { - return getFPS_native(pointer); - } - - public double getAverageFPS() { - return getAverageFPS_native(pointer); - } - - public Position getMousePosition() { - return getMousePosition_native(pointer); - } - - public boolean getMouseState(MouseButton button) { - return getMouseState_native(pointer, button); - } - - public boolean getKeyState(Key key) { - return getKeyState_native(pointer, key); - } - - public Position getScreenPosition() { - return getScreenPosition_native(pointer); - } - - public void setScreenPosition(int x, int y) { - setScreenPosition_native(pointer, x, y); - } - - public void setScreenPosition(Position p) { - setScreenPosition_native(pointer, p); - } - - public void pingMinimap(int x, int y) { - pingMinimap_native(pointer, x, y); - } - - public void pingMinimap(Position p) { - pingMinimap_native(pointer, p); - } - - public boolean isFlagEnabled(int flag) { - return isFlagEnabled_native(pointer, flag); - } - - public void enableFlag(int flag) { - enableFlag_native(pointer, flag); - } - - public Error getLastError() { - return getLastError_native(pointer); - } - - public boolean setLastError() { - return setLastError_native(pointer); - } - - public boolean setLastError(Error e) { - return setLastError_native(pointer, e); - } - - public int mapWidth() { - return mapWidth_native(pointer); - } - - public int mapHeight() { - return mapHeight_native(pointer); - } - - public String mapFileName() { - return mapFileName_native(pointer); - } - - public String mapPathName() { - return mapPathName_native(pointer); - } - - public String mapName() { - return mapName_native(pointer); - } - - public String mapHash() { - return mapHash_native(pointer); - } - - public boolean isWalkable(int walkX, int walkY) { - return isWalkable_native(pointer, walkX, walkY); - } - - public boolean isWalkable(WalkPosition position) { - return isWalkable_native(pointer, position); - } - - public int getGroundHeight(int tileX, int tileY) { - return getGroundHeight_native(pointer, tileX, tileY); - } - - public int getGroundHeight(TilePosition position) { - return getGroundHeight_native(pointer, position); - } - - public boolean isBuildable(int tileX, int tileY) { - return isBuildable_native(pointer, tileX, tileY); - } - - public boolean isBuildable(int tileX, int tileY, boolean includeBuildings) { - return isBuildable_native(pointer, tileX, tileY, includeBuildings); - } - - public boolean isBuildable(TilePosition position) { - return isBuildable_native(pointer, position); - } - - public boolean isBuildable(TilePosition position, boolean includeBuildings) { - return isBuildable_native(pointer, position, includeBuildings); - } - - public boolean isVisible(int tileX, int tileY) { - return isVisible_native(pointer, tileX, tileY); - } - - public boolean isVisible(TilePosition position) { - return isVisible_native(pointer, position); - } - - public boolean isExplored(int tileX, int tileY) { - return isExplored_native(pointer, tileX, tileY); - } - - public boolean isExplored(TilePosition position) { - return isExplored_native(pointer, position); - } - - public boolean hasCreep(int tileX, int tileY) { - return hasCreep_native(pointer, tileX, tileY); - } - - public boolean hasCreep(TilePosition position) { - return hasCreep_native(pointer, position); - } - - public boolean hasPowerPrecise(int x, int y) { - return hasPowerPrecise_native(pointer, x, y); - } - - public boolean hasPowerPrecise(int x, int y, UnitType unitType) { - return hasPowerPrecise_native(pointer, x, y, unitType); - } - - public boolean hasPowerPrecise(Position position) { - return hasPowerPrecise_native(pointer, position); - } - - public boolean hasPowerPrecise(Position position, UnitType unitType) { - return hasPowerPrecise_native(pointer, position, unitType); - } - - public boolean hasPower(int tileX, int tileY) { - return hasPower_native(pointer, tileX, tileY); - } - - public boolean hasPower(int tileX, int tileY, UnitType unitType) { - return hasPower_native(pointer, tileX, tileY, unitType); - } - - public boolean hasPower(TilePosition position) { - return hasPower_native(pointer, position); - } - - public boolean hasPower(TilePosition position, UnitType unitType) { - return hasPower_native(pointer, position, unitType); - } - - public boolean hasPower(int tileX, int tileY, int tileWidth, int tileHeight) { - return hasPower_native(pointer, tileX, tileY, tileWidth, tileHeight); - } - - public boolean hasPower(int tileX, int tileY, int tileWidth, int tileHeight, UnitType unitType) { - return hasPower_native(pointer, tileX, tileY, tileWidth, tileHeight, unitType); - } - - public boolean hasPower(TilePosition position, int tileWidth, int tileHeight) { - return hasPower_native(pointer, position, tileWidth, tileHeight); - } - - public boolean hasPower(TilePosition position, int tileWidth, int tileHeight, UnitType unitType) { - return hasPower_native(pointer, position, tileWidth, tileHeight, unitType); - } - - public boolean canBuildHere(TilePosition position, UnitType type, Unit builder) { - return canBuildHere_native(pointer, position, type, builder); - } - - public boolean canBuildHere(TilePosition position, UnitType type) { - return canBuildHere_native(pointer, position, type); - } - - public boolean canBuildHere(TilePosition position, UnitType type, Unit builder, boolean checkExplored) { - return canBuildHere_native(pointer, position, type, builder, checkExplored); - } - - public boolean canMake(UnitType type) { - return canMake_native(pointer, type); - } - - public boolean canMake(UnitType type, Unit builder) { - return canMake_native(pointer, type, builder); - } - - public boolean canResearch(TechType type, Unit unit) { - return canResearch_native(pointer, type, unit); - } - - public boolean canResearch(TechType type) { - return canResearch_native(pointer, type); - } - - public boolean canResearch(TechType type, Unit unit, boolean checkCanIssueCommandType) { - return canResearch_native(pointer, type, unit, checkCanIssueCommandType); - } - - public boolean canUpgrade(UpgradeType type, Unit unit) { - return canUpgrade_native(pointer, type, unit); - } - - public boolean canUpgrade(UpgradeType type) { - return canUpgrade_native(pointer, type); - } - - public boolean canUpgrade(UpgradeType type, Unit unit, boolean checkCanIssueCommandType) { - return canUpgrade_native(pointer, type, unit, checkCanIssueCommandType); - } - - public void printf(String cstr_format) { - printf_native(pointer, cstr_format); - } - - public void sendText(String cstr_format) { - sendText_native(pointer, cstr_format); - } - - public void sendTextEx(boolean toAllies, String cstr_format) { - sendTextEx_native(pointer, toAllies, cstr_format); - } - - public boolean isInGame() { - return isInGame_native(pointer); - } - - public boolean isMultiplayer() { - return isMultiplayer_native(pointer); - } - - public boolean isBattleNet() { - return isBattleNet_native(pointer); - } - - public boolean isPaused() { - return isPaused_native(pointer); - } - - public boolean isReplay() { - return isReplay_native(pointer); - } - - public void pauseGame() { - pauseGame_native(pointer); - } - - public void resumeGame() { - resumeGame_native(pointer); - } - - public void leaveGame() { - leaveGame_native(pointer); - } - - public void restartGame() { - restartGame_native(pointer); - } - - public void setLocalSpeed(int speed) { - setLocalSpeed_native(pointer, speed); - } - - public boolean issueCommand(List units, UnitCommand command) { - return issueCommand_native(pointer, units, command); - } - - public List getSelectedUnits() { - return getSelectedUnits_native(pointer); - } - - public Player self() { - return self_native(pointer); - } - - public Player enemy() { - return enemy_native(pointer); - } - - public Player neutral() { - return neutral_native(pointer); - } - - public List allies() { - return allies_native(pointer); - } - - public List enemies() { - return enemies_native(pointer); - } - - public List observers() { - return observers_native(pointer); - } - - public void setTextSize() { - setTextSize_native(pointer); - } - - public void setTextSize(bwapi4.Text.Size.Enum size) { - setTextSize_native(pointer, size); - } - - public void drawText(bwapi4.CoordinateType.Enum ctype, int x, int y, String cstr_format) { - drawText_native(pointer, ctype, x, y, cstr_format); - } - - public void drawTextMap(int x, int y, String cstr_format) { - drawTextMap_native(pointer, x, y, cstr_format); - } - - public void drawTextMap(Position p, String cstr_format) { - drawTextMap_native(pointer, p, cstr_format); - } - - public void drawTextMouse(int x, int y, String cstr_format) { - drawTextMouse_native(pointer, x, y, cstr_format); - } - - public void drawTextMouse(Position p, String cstr_format) { - drawTextMouse_native(pointer, p, cstr_format); - } - - public void drawTextScreen(int x, int y, String cstr_format) { - drawTextScreen_native(pointer, x, y, cstr_format); - } - - public void drawTextScreen(Position p, String cstr_format) { - drawTextScreen_native(pointer, p, cstr_format); - } - - public void drawBox(bwapi4.CoordinateType.Enum ctype, int left, int top, int right, int bottom, Color color) { - drawBox_native(pointer, ctype, left, top, right, bottom, color); - } - - public void drawBox(bwapi4.CoordinateType.Enum ctype, int left, int top, int right, int bottom, Color color, boolean isSolid) { - drawBox_native(pointer, ctype, left, top, right, bottom, color, isSolid); - } - - public void drawBoxMap(int left, int top, int right, int bottom, Color color) { - drawBoxMap_native(pointer, left, top, right, bottom, color); - } - - public void drawBoxMap(int left, int top, int right, int bottom, Color color, boolean isSolid) { - drawBoxMap_native(pointer, left, top, right, bottom, color, isSolid); - } - - public void drawBoxMap(Position leftTop, Position rightBottom, Color color) { - drawBoxMap_native(pointer, leftTop, rightBottom, color); - } - - public void drawBoxMap(Position leftTop, Position rightBottom, Color color, boolean isSolid) { - drawBoxMap_native(pointer, leftTop, rightBottom, color, isSolid); - } - - public void drawBoxMouse(int left, int top, int right, int bottom, Color color) { - drawBoxMouse_native(pointer, left, top, right, bottom, color); - } - - public void drawBoxMouse(int left, int top, int right, int bottom, Color color, boolean isSolid) { - drawBoxMouse_native(pointer, left, top, right, bottom, color, isSolid); - } - - public void drawBoxMouse(Position leftTop, Position rightBottom, Color color) { - drawBoxMouse_native(pointer, leftTop, rightBottom, color); - } - - public void drawBoxMouse(Position leftTop, Position rightBottom, Color color, boolean isSolid) { - drawBoxMouse_native(pointer, leftTop, rightBottom, color, isSolid); - } - - public void drawBoxScreen(int left, int top, int right, int bottom, Color color) { - drawBoxScreen_native(pointer, left, top, right, bottom, color); - } - - public void drawBoxScreen(int left, int top, int right, int bottom, Color color, boolean isSolid) { - drawBoxScreen_native(pointer, left, top, right, bottom, color, isSolid); - } - - public void drawBoxScreen(Position leftTop, Position rightBottom, Color color) { - drawBoxScreen_native(pointer, leftTop, rightBottom, color); - } - - public void drawBoxScreen(Position leftTop, Position rightBottom, Color color, boolean isSolid) { - drawBoxScreen_native(pointer, leftTop, rightBottom, color, isSolid); - } - - public void drawTriangle(bwapi4.CoordinateType.Enum ctype, int ax, int ay, int bx, int by, int cx, int cy, Color color) { - drawTriangle_native(pointer, ctype, ax, ay, bx, by, cx, cy, color); - } - - public void drawTriangle(bwapi4.CoordinateType.Enum ctype, int ax, int ay, int bx, int by, int cx, int cy, Color color, boolean isSolid) { - drawTriangle_native(pointer, ctype, ax, ay, bx, by, cx, cy, color, isSolid); - } - - public void drawTriangleMap(int ax, int ay, int bx, int by, int cx, int cy, Color color) { - drawTriangleMap_native(pointer, ax, ay, bx, by, cx, cy, color); - } - - public void drawTriangleMap(int ax, int ay, int bx, int by, int cx, int cy, Color color, boolean isSolid) { - drawTriangleMap_native(pointer, ax, ay, bx, by, cx, cy, color, isSolid); - } - - public void drawTriangleMap(Position a, Position b, Position c, Color color) { - drawTriangleMap_native(pointer, a, b, c, color); - } - - public void drawTriangleMap(Position a, Position b, Position c, Color color, boolean isSolid) { - drawTriangleMap_native(pointer, a, b, c, color, isSolid); - } - - public void drawTriangleMouse(int ax, int ay, int bx, int by, int cx, int cy, Color color) { - drawTriangleMouse_native(pointer, ax, ay, bx, by, cx, cy, color); - } - - public void drawTriangleMouse(int ax, int ay, int bx, int by, int cx, int cy, Color color, boolean isSolid) { - drawTriangleMouse_native(pointer, ax, ay, bx, by, cx, cy, color, isSolid); - } - - public void drawTriangleMouse(Position a, Position b, Position c, Color color) { - drawTriangleMouse_native(pointer, a, b, c, color); - } - - public void drawTriangleMouse(Position a, Position b, Position c, Color color, boolean isSolid) { - drawTriangleMouse_native(pointer, a, b, c, color, isSolid); - } - - public void drawTriangleScreen(int ax, int ay, int bx, int by, int cx, int cy, Color color) { - drawTriangleScreen_native(pointer, ax, ay, bx, by, cx, cy, color); - } - - public void drawTriangleScreen(int ax, int ay, int bx, int by, int cx, int cy, Color color, boolean isSolid) { - drawTriangleScreen_native(pointer, ax, ay, bx, by, cx, cy, color, isSolid); - } - - public void drawTriangleScreen(Position a, Position b, Position c, Color color) { - drawTriangleScreen_native(pointer, a, b, c, color); - } - - public void drawTriangleScreen(Position a, Position b, Position c, Color color, boolean isSolid) { - drawTriangleScreen_native(pointer, a, b, c, color, isSolid); - } - - public void drawCircle(bwapi4.CoordinateType.Enum ctype, int x, int y, int radius, Color color) { - drawCircle_native(pointer, ctype, x, y, radius, color); - } - - public void drawCircle(bwapi4.CoordinateType.Enum ctype, int x, int y, int radius, Color color, boolean isSolid) { - drawCircle_native(pointer, ctype, x, y, radius, color, isSolid); - } - - public void drawCircleMap(int x, int y, int radius, Color color) { - drawCircleMap_native(pointer, x, y, radius, color); - } - - public void drawCircleMap(int x, int y, int radius, Color color, boolean isSolid) { - drawCircleMap_native(pointer, x, y, radius, color, isSolid); - } - - public void drawCircleMap(Position p, int radius, Color color) { - drawCircleMap_native(pointer, p, radius, color); - } - - public void drawCircleMap(Position p, int radius, Color color, boolean isSolid) { - drawCircleMap_native(pointer, p, radius, color, isSolid); - } - - public void drawCircleMouse(int x, int y, int radius, Color color) { - drawCircleMouse_native(pointer, x, y, radius, color); - } - - public void drawCircleMouse(int x, int y, int radius, Color color, boolean isSolid) { - drawCircleMouse_native(pointer, x, y, radius, color, isSolid); - } - - public void drawCircleMouse(Position p, int radius, Color color) { - drawCircleMouse_native(pointer, p, radius, color); - } - - public void drawCircleMouse(Position p, int radius, Color color, boolean isSolid) { - drawCircleMouse_native(pointer, p, radius, color, isSolid); - } - - public void drawCircleScreen(int x, int y, int radius, Color color) { - drawCircleScreen_native(pointer, x, y, radius, color); - } - - public void drawCircleScreen(int x, int y, int radius, Color color, boolean isSolid) { - drawCircleScreen_native(pointer, x, y, radius, color, isSolid); - } - - public void drawCircleScreen(Position p, int radius, Color color) { - drawCircleScreen_native(pointer, p, radius, color); - } - - public void drawCircleScreen(Position p, int radius, Color color, boolean isSolid) { - drawCircleScreen_native(pointer, p, radius, color, isSolid); - } - - public void drawEllipse(bwapi4.CoordinateType.Enum ctype, int x, int y, int xrad, int yrad, Color color) { - drawEllipse_native(pointer, ctype, x, y, xrad, yrad, color); - } - - public void drawEllipse(bwapi4.CoordinateType.Enum ctype, int x, int y, int xrad, int yrad, Color color, boolean isSolid) { - drawEllipse_native(pointer, ctype, x, y, xrad, yrad, color, isSolid); - } - - public void drawEllipseMap(int x, int y, int xrad, int yrad, Color color) { - drawEllipseMap_native(pointer, x, y, xrad, yrad, color); - } - - public void drawEllipseMap(int x, int y, int xrad, int yrad, Color color, boolean isSolid) { - drawEllipseMap_native(pointer, x, y, xrad, yrad, color, isSolid); - } - - public void drawEllipseMap(Position p, int xrad, int yrad, Color color) { - drawEllipseMap_native(pointer, p, xrad, yrad, color); - } - - public void drawEllipseMap(Position p, int xrad, int yrad, Color color, boolean isSolid) { - drawEllipseMap_native(pointer, p, xrad, yrad, color, isSolid); - } - - public void drawEllipseMouse(int x, int y, int xrad, int yrad, Color color) { - drawEllipseMouse_native(pointer, x, y, xrad, yrad, color); - } - - public void drawEllipseMouse(int x, int y, int xrad, int yrad, Color color, boolean isSolid) { - drawEllipseMouse_native(pointer, x, y, xrad, yrad, color, isSolid); - } - - public void drawEllipseMouse(Position p, int xrad, int yrad, Color color) { - drawEllipseMouse_native(pointer, p, xrad, yrad, color); - } - - public void drawEllipseMouse(Position p, int xrad, int yrad, Color color, boolean isSolid) { - drawEllipseMouse_native(pointer, p, xrad, yrad, color, isSolid); - } - - public void drawEllipseScreen(int x, int y, int xrad, int yrad, Color color) { - drawEllipseScreen_native(pointer, x, y, xrad, yrad, color); - } - - public void drawEllipseScreen(int x, int y, int xrad, int yrad, Color color, boolean isSolid) { - drawEllipseScreen_native(pointer, x, y, xrad, yrad, color, isSolid); - } - - public void drawEllipseScreen(Position p, int xrad, int yrad, Color color) { - drawEllipseScreen_native(pointer, p, xrad, yrad, color); - } - - public void drawEllipseScreen(Position p, int xrad, int yrad, Color color, boolean isSolid) { - drawEllipseScreen_native(pointer, p, xrad, yrad, color, isSolid); - } - - public void drawDot(bwapi4.CoordinateType.Enum ctype, int x, int y, Color color) { - drawDot_native(pointer, ctype, x, y, color); - } - - public void drawDotMap(int x, int y, Color color) { - drawDotMap_native(pointer, x, y, color); - } - - public void drawDotMap(Position p, Color color) { - drawDotMap_native(pointer, p, color); - } - - public void drawDotMouse(int x, int y, Color color) { - drawDotMouse_native(pointer, x, y, color); - } - - public void drawDotMouse(Position p, Color color) { - drawDotMouse_native(pointer, p, color); - } - - public void drawDotScreen(int x, int y, Color color) { - drawDotScreen_native(pointer, x, y, color); - } - - public void drawDotScreen(Position p, Color color) { - drawDotScreen_native(pointer, p, color); - } - - public void drawLine(bwapi4.CoordinateType.Enum ctype, int x1, int y1, int x2, int y2, Color color) { - drawLine_native(pointer, ctype, x1, y1, x2, y2, color); - } - - public void drawLineMap(int x1, int y1, int x2, int y2, Color color) { - drawLineMap_native(pointer, x1, y1, x2, y2, color); - } - - public void drawLineMap(Position a, Position b, Color color) { - drawLineMap_native(pointer, a, b, color); - } - - public void drawLineMouse(int x1, int y1, int x2, int y2, Color color) { - drawLineMouse_native(pointer, x1, y1, x2, y2, color); - } - - public void drawLineMouse(Position a, Position b, Color color) { - drawLineMouse_native(pointer, a, b, color); - } - - public void drawLineScreen(int x1, int y1, int x2, int y2, Color color) { - drawLineScreen_native(pointer, x1, y1, x2, y2, color); - } - - public void drawLineScreen(Position a, Position b, Color color) { - drawLineScreen_native(pointer, a, b, color); - } - - public int getLatencyFrames() { - return getLatencyFrames_native(pointer); - } - - public int getLatencyTime() { - return getLatencyTime_native(pointer); - } - - public int getRemainingLatencyFrames() { - return getRemainingLatencyFrames_native(pointer); - } - - public int getRemainingLatencyTime() { - return getRemainingLatencyTime_native(pointer); - } - - public int getRevision() { - return getRevision_native(pointer); - } - - public boolean isDebug() { - return isDebug_native(pointer); - } - - public boolean isLatComEnabled() { - return isLatComEnabled_native(pointer); - } - - public void setLatCom(boolean isEnabled) { - setLatCom_native(pointer, isEnabled); - } - - public boolean isGUIEnabled() { - return isGUIEnabled_native(pointer); - } - - public void setGUI(boolean enabled) { - setGUI_native(pointer, enabled); - } - - public int getInstanceNumber() { - return getInstanceNumber_native(pointer); - } - - public int getAPM() { - return getAPM_native(pointer); - } - - public int getAPM(boolean includeSelects) { - return getAPM_native(pointer, includeSelects); - } - - public boolean setMap(String cstr_mapFileName) { - return setMap_native(pointer, cstr_mapFileName); - } - - public void setFrameSkip(int frameSkip) { - setFrameSkip_native(pointer, frameSkip); - } - - public boolean hasPath(Position source, Position destination) { - return hasPath_native(pointer, source, destination); - } - - public boolean setAlliance(Player player, boolean allied) { - return setAlliance_native(pointer, player, allied); - } - - public boolean setAlliance(Player player) { - return setAlliance_native(pointer, player); - } - - public boolean setAlliance(Player player, boolean allied, boolean alliedVictory) { - return setAlliance_native(pointer, player, allied, alliedVictory); - } - - public boolean setVision(Player player) { - return setVision_native(pointer, player); - } - - public boolean setVision(Player player, boolean enabled) { - return setVision_native(pointer, player, enabled); - } - - public int elapsedTime() { - return elapsedTime_native(pointer); - } - - public void setCommandOptimizationLevel(int level) { - setCommandOptimizationLevel_native(pointer, level); - } - - public int countdownTimer() { - return countdownTimer_native(pointer); - } - - public List getAllRegions() { - return getAllRegions_native(pointer); - } - - public Region getRegionAt(int x, int y) { - return getRegionAt_native(pointer, x, y); - } - - public Region getRegionAt(Position position) { - return getRegionAt_native(pointer, position); - } - - public int getLastEventTime() { - return getLastEventTime_native(pointer); - } - - public boolean setRevealAll() { - return setRevealAll_native(pointer); - } - - public boolean setRevealAll(boolean reveal) { - return setRevealAll_native(pointer, reveal); - } - - public TilePosition getBuildLocation(UnitType type, TilePosition desiredPosition, int maxRange) { - return getBuildLocation_native(pointer, type, desiredPosition, maxRange); - } - - public TilePosition getBuildLocation(UnitType type, TilePosition desiredPosition) { - return getBuildLocation_native(pointer, type, desiredPosition); - } - - public TilePosition getBuildLocation(UnitType type, TilePosition desiredPosition, int maxRange, boolean creep) { - return getBuildLocation_native(pointer, type, desiredPosition, maxRange, creep); - } - - public int getDamageFrom(UnitType fromType, UnitType toType, Player fromPlayer) { - return getDamageFrom_native(pointer, fromType, toType, fromPlayer); - } - - public int getDamageFrom(UnitType fromType, UnitType toType) { - return getDamageFrom_native(pointer, fromType, toType); - } - - public int getDamageFrom(UnitType fromType, UnitType toType, Player fromPlayer, Player toPlayer) { - return getDamageFrom_native(pointer, fromType, toType, fromPlayer, toPlayer); - } - - public int getDamageTo(UnitType toType, UnitType fromType, Player toPlayer) { - return getDamageTo_native(pointer, toType, fromType, toPlayer); - } - - public int getDamageTo(UnitType toType, UnitType fromType) { - return getDamageTo_native(pointer, toType, fromType); - } - - public int getDamageTo(UnitType toType, UnitType fromType, Player toPlayer, Player fromPlayer) { - return getDamageTo_native(pointer, toType, fromType, toPlayer, fromPlayer); - } - - - private static Map instances = new HashMap(); - - private Game(long pointer) { - this.pointer = pointer; - } - - private static Game get(long pointer) { - if (pointer == 0 ) { - return null; - } - Game instance = instances.get(pointer); - if (instance == null ) { - instance = new Game(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native List getForces_native(long pointer); - - private native List getPlayers_native(long pointer); - - private native List getAllUnits_native(long pointer); - - private native List getMinerals_native(long pointer); - - private native List getGeysers_native(long pointer); - - private native List getNeutralUnits_native(long pointer); - - private native List getStaticMinerals_native(long pointer); - - private native List getStaticGeysers_native(long pointer); - - private native List getStaticNeutralUnits_native(long pointer); - - private native List getBullets_native(long pointer); - - private native Force getForce_native(long pointer, int forceID); - - private native Player getPlayer_native(long pointer, int playerID); - - private native Unit getUnit_native(long pointer, int unitID); - - private native Unit indexToUnit_native(long pointer, int unitIndex); - - private native Region getRegion_native(long pointer, int regionID); - - private native GameType getGameType_native(long pointer); - - private native int getLatency_native(long pointer); - - private native int getFrameCount_native(long pointer); - - private native int getReplayFrameCount_native(long pointer); - - private native int getFPS_native(long pointer); - - private native double getAverageFPS_native(long pointer); - - private native Position getMousePosition_native(long pointer); - - private native boolean getMouseState_native(long pointer, MouseButton button); - - private native boolean getKeyState_native(long pointer, Key key); - - private native Position getScreenPosition_native(long pointer); - - private native void setScreenPosition_native(long pointer, int x, int y); - - private native void setScreenPosition_native(long pointer, Position p); - - private native void pingMinimap_native(long pointer, int x, int y); - - private native void pingMinimap_native(long pointer, Position p); - - private native boolean isFlagEnabled_native(long pointer, int flag); - - private native void enableFlag_native(long pointer, int flag); - - private native Error getLastError_native(long pointer); - - private native boolean setLastError_native(long pointer); - - private native boolean setLastError_native(long pointer, Error e); - - private native int mapWidth_native(long pointer); - - private native int mapHeight_native(long pointer); - - private native String mapFileName_native(long pointer); - - private native String mapPathName_native(long pointer); - - private native String mapName_native(long pointer); - - private native String mapHash_native(long pointer); - - private native boolean isWalkable_native(long pointer, int walkX, int walkY); - - private native boolean isWalkable_native(long pointer, WalkPosition position); - - private native int getGroundHeight_native(long pointer, int tileX, int tileY); - - private native int getGroundHeight_native(long pointer, TilePosition position); - - private native boolean isBuildable_native(long pointer, int tileX, int tileY); - - private native boolean isBuildable_native(long pointer, int tileX, int tileY, boolean includeBuildings); - - private native boolean isBuildable_native(long pointer, TilePosition position); - - private native boolean isBuildable_native(long pointer, TilePosition position, boolean includeBuildings); - - private native boolean isVisible_native(long pointer, int tileX, int tileY); - - private native boolean isVisible_native(long pointer, TilePosition position); - - private native boolean isExplored_native(long pointer, int tileX, int tileY); - - private native boolean isExplored_native(long pointer, TilePosition position); - - private native boolean hasCreep_native(long pointer, int tileX, int tileY); - - private native boolean hasCreep_native(long pointer, TilePosition position); - - private native boolean hasPowerPrecise_native(long pointer, int x, int y); - - private native boolean hasPowerPrecise_native(long pointer, int x, int y, UnitType unitType); - - private native boolean hasPowerPrecise_native(long pointer, Position position); - - private native boolean hasPowerPrecise_native(long pointer, Position position, UnitType unitType); - - private native boolean hasPower_native(long pointer, int tileX, int tileY); - - private native boolean hasPower_native(long pointer, int tileX, int tileY, UnitType unitType); - - private native boolean hasPower_native(long pointer, TilePosition position); - - private native boolean hasPower_native(long pointer, TilePosition position, UnitType unitType); - - private native boolean hasPower_native(long pointer, int tileX, int tileY, int tileWidth, int tileHeight); - - private native boolean hasPower_native(long pointer, int tileX, int tileY, int tileWidth, int tileHeight, UnitType unitType); - - private native boolean hasPower_native(long pointer, TilePosition position, int tileWidth, int tileHeight); - - private native boolean hasPower_native(long pointer, TilePosition position, int tileWidth, int tileHeight, UnitType unitType); - - private native boolean canBuildHere_native(long pointer, TilePosition position, UnitType type, Unit builder); - - private native boolean canBuildHere_native(long pointer, TilePosition position, UnitType type); - - private native boolean canBuildHere_native(long pointer, TilePosition position, UnitType type, Unit builder, boolean checkExplored); - - private native boolean canMake_native(long pointer, UnitType type); - - private native boolean canMake_native(long pointer, UnitType type, Unit builder); - - private native boolean canResearch_native(long pointer, TechType type, Unit unit); - - private native boolean canResearch_native(long pointer, TechType type); - - private native boolean canResearch_native(long pointer, TechType type, Unit unit, boolean checkCanIssueCommandType); - - private native boolean canUpgrade_native(long pointer, UpgradeType type, Unit unit); - - private native boolean canUpgrade_native(long pointer, UpgradeType type); - - private native boolean canUpgrade_native(long pointer, UpgradeType type, Unit unit, boolean checkCanIssueCommandType); - - private native void printf_native(long pointer, String cstr_format); - - private native void sendText_native(long pointer, String cstr_format); - - private native void sendTextEx_native(long pointer, boolean toAllies, String cstr_format); - - private native boolean isInGame_native(long pointer); - - private native boolean isMultiplayer_native(long pointer); - - private native boolean isBattleNet_native(long pointer); - - private native boolean isPaused_native(long pointer); - - private native boolean isReplay_native(long pointer); - - private native void pauseGame_native(long pointer); - - private native void resumeGame_native(long pointer); - - private native void leaveGame_native(long pointer); - - private native void restartGame_native(long pointer); - - private native void setLocalSpeed_native(long pointer, int speed); - - private native boolean issueCommand_native(long pointer, List units, UnitCommand command); - - private native List getSelectedUnits_native(long pointer); - - private native Player self_native(long pointer); - - private native Player enemy_native(long pointer); - - private native Player neutral_native(long pointer); - - private native List allies_native(long pointer); - - private native List enemies_native(long pointer); - - private native List observers_native(long pointer); - - private native void setTextSize_native(long pointer); - - private native void setTextSize_native(long pointer, bwapi4.Text.Size.Enum size); - - private native void drawText_native(long pointer, bwapi4.CoordinateType.Enum ctype, int x, int y, String cstr_format); - - private native void drawTextMap_native(long pointer, int x, int y, String cstr_format); - - private native void drawTextMap_native(long pointer, Position p, String cstr_format); - - private native void drawTextMouse_native(long pointer, int x, int y, String cstr_format); - - private native void drawTextMouse_native(long pointer, Position p, String cstr_format); - - private native void drawTextScreen_native(long pointer, int x, int y, String cstr_format); - - private native void drawTextScreen_native(long pointer, Position p, String cstr_format); - - private native void drawBox_native(long pointer, bwapi4.CoordinateType.Enum ctype, int left, int top, int right, int bottom, Color color); - - private native void drawBox_native(long pointer, bwapi4.CoordinateType.Enum ctype, int left, int top, int right, int bottom, Color color, boolean isSolid); - - private native void drawBoxMap_native(long pointer, int left, int top, int right, int bottom, Color color); - - private native void drawBoxMap_native(long pointer, int left, int top, int right, int bottom, Color color, boolean isSolid); - - private native void drawBoxMap_native(long pointer, Position leftTop, Position rightBottom, Color color); - - private native void drawBoxMap_native(long pointer, Position leftTop, Position rightBottom, Color color, boolean isSolid); - - private native void drawBoxMouse_native(long pointer, int left, int top, int right, int bottom, Color color); - - private native void drawBoxMouse_native(long pointer, int left, int top, int right, int bottom, Color color, boolean isSolid); - - private native void drawBoxMouse_native(long pointer, Position leftTop, Position rightBottom, Color color); - - private native void drawBoxMouse_native(long pointer, Position leftTop, Position rightBottom, Color color, boolean isSolid); - - private native void drawBoxScreen_native(long pointer, int left, int top, int right, int bottom, Color color); - - private native void drawBoxScreen_native(long pointer, int left, int top, int right, int bottom, Color color, boolean isSolid); - - private native void drawBoxScreen_native(long pointer, Position leftTop, Position rightBottom, Color color); - - private native void drawBoxScreen_native(long pointer, Position leftTop, Position rightBottom, Color color, boolean isSolid); - - private native void drawTriangle_native(long pointer, bwapi4.CoordinateType.Enum ctype, int ax, int ay, int bx, int by, int cx, int cy, Color color); - - private native void drawTriangle_native(long pointer, bwapi4.CoordinateType.Enum ctype, int ax, int ay, int bx, int by, int cx, int cy, Color color, boolean isSolid); - - private native void drawTriangleMap_native(long pointer, int ax, int ay, int bx, int by, int cx, int cy, Color color); - - private native void drawTriangleMap_native(long pointer, int ax, int ay, int bx, int by, int cx, int cy, Color color, boolean isSolid); - - private native void drawTriangleMap_native(long pointer, Position a, Position b, Position c, Color color); - - private native void drawTriangleMap_native(long pointer, Position a, Position b, Position c, Color color, boolean isSolid); - - private native void drawTriangleMouse_native(long pointer, int ax, int ay, int bx, int by, int cx, int cy, Color color); - - private native void drawTriangleMouse_native(long pointer, int ax, int ay, int bx, int by, int cx, int cy, Color color, boolean isSolid); - - private native void drawTriangleMouse_native(long pointer, Position a, Position b, Position c, Color color); - - private native void drawTriangleMouse_native(long pointer, Position a, Position b, Position c, Color color, boolean isSolid); - - private native void drawTriangleScreen_native(long pointer, int ax, int ay, int bx, int by, int cx, int cy, Color color); - - private native void drawTriangleScreen_native(long pointer, int ax, int ay, int bx, int by, int cx, int cy, Color color, boolean isSolid); - - private native void drawTriangleScreen_native(long pointer, Position a, Position b, Position c, Color color); - - private native void drawTriangleScreen_native(long pointer, Position a, Position b, Position c, Color color, boolean isSolid); - - private native void drawCircle_native(long pointer, bwapi4.CoordinateType.Enum ctype, int x, int y, int radius, Color color); - - private native void drawCircle_native(long pointer, bwapi4.CoordinateType.Enum ctype, int x, int y, int radius, Color color, boolean isSolid); - - private native void drawCircleMap_native(long pointer, int x, int y, int radius, Color color); - - private native void drawCircleMap_native(long pointer, int x, int y, int radius, Color color, boolean isSolid); - - private native void drawCircleMap_native(long pointer, Position p, int radius, Color color); - - private native void drawCircleMap_native(long pointer, Position p, int radius, Color color, boolean isSolid); - - private native void drawCircleMouse_native(long pointer, int x, int y, int radius, Color color); - - private native void drawCircleMouse_native(long pointer, int x, int y, int radius, Color color, boolean isSolid); - - private native void drawCircleMouse_native(long pointer, Position p, int radius, Color color); - - private native void drawCircleMouse_native(long pointer, Position p, int radius, Color color, boolean isSolid); - - private native void drawCircleScreen_native(long pointer, int x, int y, int radius, Color color); - - private native void drawCircleScreen_native(long pointer, int x, int y, int radius, Color color, boolean isSolid); - - private native void drawCircleScreen_native(long pointer, Position p, int radius, Color color); - - private native void drawCircleScreen_native(long pointer, Position p, int radius, Color color, boolean isSolid); - - private native void drawEllipse_native(long pointer, bwapi4.CoordinateType.Enum ctype, int x, int y, int xrad, int yrad, Color color); - - private native void drawEllipse_native(long pointer, bwapi4.CoordinateType.Enum ctype, int x, int y, int xrad, int yrad, Color color, boolean isSolid); - - private native void drawEllipseMap_native(long pointer, int x, int y, int xrad, int yrad, Color color); - - private native void drawEllipseMap_native(long pointer, int x, int y, int xrad, int yrad, Color color, boolean isSolid); - - private native void drawEllipseMap_native(long pointer, Position p, int xrad, int yrad, Color color); - - private native void drawEllipseMap_native(long pointer, Position p, int xrad, int yrad, Color color, boolean isSolid); - - private native void drawEllipseMouse_native(long pointer, int x, int y, int xrad, int yrad, Color color); - - private native void drawEllipseMouse_native(long pointer, int x, int y, int xrad, int yrad, Color color, boolean isSolid); - - private native void drawEllipseMouse_native(long pointer, Position p, int xrad, int yrad, Color color); - - private native void drawEllipseMouse_native(long pointer, Position p, int xrad, int yrad, Color color, boolean isSolid); - - private native void drawEllipseScreen_native(long pointer, int x, int y, int xrad, int yrad, Color color); - - private native void drawEllipseScreen_native(long pointer, int x, int y, int xrad, int yrad, Color color, boolean isSolid); - - private native void drawEllipseScreen_native(long pointer, Position p, int xrad, int yrad, Color color); - - private native void drawEllipseScreen_native(long pointer, Position p, int xrad, int yrad, Color color, boolean isSolid); - - private native void drawDot_native(long pointer, bwapi4.CoordinateType.Enum ctype, int x, int y, Color color); - - private native void drawDotMap_native(long pointer, int x, int y, Color color); - - private native void drawDotMap_native(long pointer, Position p, Color color); - - private native void drawDotMouse_native(long pointer, int x, int y, Color color); - - private native void drawDotMouse_native(long pointer, Position p, Color color); - - private native void drawDotScreen_native(long pointer, int x, int y, Color color); - - private native void drawDotScreen_native(long pointer, Position p, Color color); - - private native void drawLine_native(long pointer, bwapi4.CoordinateType.Enum ctype, int x1, int y1, int x2, int y2, Color color); - - private native void drawLineMap_native(long pointer, int x1, int y1, int x2, int y2, Color color); - - private native void drawLineMap_native(long pointer, Position a, Position b, Color color); - - private native void drawLineMouse_native(long pointer, int x1, int y1, int x2, int y2, Color color); - - private native void drawLineMouse_native(long pointer, Position a, Position b, Color color); - - private native void drawLineScreen_native(long pointer, int x1, int y1, int x2, int y2, Color color); - - private native void drawLineScreen_native(long pointer, Position a, Position b, Color color); - - private native int getLatencyFrames_native(long pointer); - - private native int getLatencyTime_native(long pointer); - - private native int getRemainingLatencyFrames_native(long pointer); - - private native int getRemainingLatencyTime_native(long pointer); - - private native int getRevision_native(long pointer); - - private native boolean isDebug_native(long pointer); - - private native boolean isLatComEnabled_native(long pointer); - - private native void setLatCom_native(long pointer, boolean isEnabled); - - private native boolean isGUIEnabled_native(long pointer); - - private native void setGUI_native(long pointer, boolean enabled); - - private native int getInstanceNumber_native(long pointer); - - private native int getAPM_native(long pointer); - - private native int getAPM_native(long pointer, boolean includeSelects); - - private native boolean setMap_native(long pointer, String cstr_mapFileName); - - private native void setFrameSkip_native(long pointer, int frameSkip); - - private native boolean hasPath_native(long pointer, Position source, Position destination); - - private native boolean setAlliance_native(long pointer, Player player, boolean allied); - - private native boolean setAlliance_native(long pointer, Player player); - - private native boolean setAlliance_native(long pointer, Player player, boolean allied, boolean alliedVictory); - - private native boolean setVision_native(long pointer, Player player); - - private native boolean setVision_native(long pointer, Player player, boolean enabled); - - private native int elapsedTime_native(long pointer); - - private native void setCommandOptimizationLevel_native(long pointer, int level); - - private native int countdownTimer_native(long pointer); - - private native List getAllRegions_native(long pointer); - - private native Region getRegionAt_native(long pointer, int x, int y); - - private native Region getRegionAt_native(long pointer, Position position); - - private native int getLastEventTime_native(long pointer); - - private native boolean setRevealAll_native(long pointer); - - private native boolean setRevealAll_native(long pointer, boolean reveal); - - private native TilePosition getBuildLocation_native(long pointer, UnitType type, TilePosition desiredPosition, int maxRange); - - private native TilePosition getBuildLocation_native(long pointer, UnitType type, TilePosition desiredPosition); - - private native TilePosition getBuildLocation_native(long pointer, UnitType type, TilePosition desiredPosition, int maxRange, boolean creep); - - private native int getDamageFrom_native(long pointer, UnitType fromType, UnitType toType, Player fromPlayer); - - private native int getDamageFrom_native(long pointer, UnitType fromType, UnitType toType); - - private native int getDamageFrom_native(long pointer, UnitType fromType, UnitType toType, Player fromPlayer, Player toPlayer); - - private native int getDamageTo_native(long pointer, UnitType toType, UnitType fromType, Player toPlayer); - - private native int getDamageTo_native(long pointer, UnitType toType, UnitType fromType); - - private native int getDamageTo_native(long pointer, UnitType toType, UnitType fromType, Player toPlayer, Player fromPlayer); - - -} diff --git a/generated/bwapi4/GameType.java b/generated/bwapi4/GameType.java deleted file mode 100644 index 5cc745d..0000000 --- a/generated/bwapi4/GameType.java +++ /dev/null @@ -1,70 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class GameType { - - public String toString() { - return toString_native(pointer); - } - - public static GameType Melee; - - public static GameType Free_For_All; - - public static GameType One_on_One; - - public static GameType Capture_The_Flag; - - public static GameType Greed; - - public static GameType Slaughter; - - public static GameType Sudden_Death; - - public static GameType Ladder; - - public static GameType Use_Map_Settings; - - public static GameType Team_Melee; - - public static GameType Team_Free_For_All; - - public static GameType Team_Capture_The_Flag; - - public static GameType Top_vs_Bottom; - - public static GameType None; - - public static GameType Unknown; - - - private static Map instances = new HashMap(); - - private GameType(long pointer) { - this.pointer = pointer; - } - - private static GameType get(long pointer) { - if (pointer == 0 ) { - return null; - } - GameType instance = instances.get(pointer); - if (instance == null ) { - instance = new GameType(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String toString_native(long pointer); - - -} diff --git a/generated/bwapi4/Key.java b/generated/bwapi4/Key.java deleted file mode 100644 index da6c5d3..0000000 --- a/generated/bwapi4/Key.java +++ /dev/null @@ -1,251 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public enum Key { - - K_LBUTTON(1), - K_RBUTTON(2), - K_CANCEL(3), - K_MBUTTON(4), - K_XBUTTON1(5), - K_XBUTTON2(6), - __UNDEFINED_7(7), - K_BACK(8), - K_TAB(9), - __RESERVED_A(10), - __RESERVED_B(11), - K_CLEAR(12), - K_RETURN(13), - __UNDEFINED_E(14), - __UNDEFINED_F(15), - K_SHIFT(16), - K_CONTROL(17), - K_MENU(18), - K_PAUSE(19), - K_CAPITAL(20), - K_KANA(21), - K_UNDEFINED_16(22), - K_JUNJA(23), - K_FINAL(24), - K_KANJI(25), - __UNDEFINED_1A(26), - K_ESCAPE(27), - K_CONVERT(28), - K_NONCONVERT(29), - K_ACCEPT(30), - K_MODECHANGE(31), - K_SPACE(32), - K_PRIOR(33), - K_NEXT(34), - K_END(35), - K_HOME(36), - K_LEFT(37), - K_UP(38), - K_RIGHT(39), - K_DOWN(40), - K_SELECT(41), - K_PRINT(42), - K_EXECUTE(43), - K_SNAPSHOT(44), - K_INSERT(45), - K_DELETE(46), - K_HELP(47), - K_0(48), - K_1(49), - K_2(50), - K_3(51), - K_4(52), - K_5(53), - K_6(54), - K_7(55), - K_8(56), - K_9(57), - __UNDEFINED_3A(58), - __UNDEFINED_3B(59), - __UNDEFINED_3C(60), - __UNDEFINED_3D(61), - __UNDEFINED_3E(62), - __UNDEFINED_3F(63), - __UNDEFINED_40(64), - K_A(65), - K_B(66), - K_C(67), - K_D(68), - K_E(69), - K_F(70), - K_G(71), - K_H(72), - K_I(73), - K_J(74), - K_K(75), - K_L(76), - K_M(77), - K_N(78), - K_O(79), - K_P(80), - K_Q(81), - K_R(82), - K_S(83), - K_T(84), - K_U(85), - K_V(86), - K_W(87), - K_X(88), - K_Y(89), - K_Z(90), - K_LWIN(91), - K_RWIN(92), - K_APPS(93), - __RESERVED_5E(94), - K_SLEEP(95), - K_NUMPAD0(96), - K_NUMPAD1(97), - K_NUMPAD2(98), - K_NUMPAD3(99), - K_NUMPAD4(100), - K_NUMPAD5(101), - K_NUMPAD6(102), - K_NUMPAD7(103), - K_NUMPAD8(104), - K_NUMPAD9(105), - K_MULTIPLY(106), - K_ADD(107), - K_SEPARATOR(108), - K_SUBTRACT(109), - K_DECIMAL(110), - K_DIVIDE(111), - K_F1(112), - K_F2(113), - K_F3(114), - K_F4(115), - K_F5(116), - K_F6(117), - K_F7(118), - K_F8(119), - K_F9(120), - K_F10(121), - K_F11(122), - K_F12(123), - K_F13(124), - K_F14(125), - K_F15(126), - K_F16(127), - K_F17(128), - K_F18(129), - K_F19(130), - K_F20(131), - K_F21(132), - K_F22(133), - K_F23(134), - K_F24(135), - __UNASSIGNED_88(136), - __UNASSIGNED_89(137), - __UNASSIGNED_8A(138), - __UNASSIGNED_8B(139), - __UNASSIGNED_8C(140), - __UNASSIGNED_8D(141), - __UNASSIGNED_8E(142), - __UNASSIGNED_8F(143), - K_NUMLOCK(144), - K_SCROLL(145), - K_OEM_NEC_EQUAL(146), - K_OEM_FJ_JISHO(147), - K_OEM_FJ_MASSHOU(148), - K_OEM_FJ_TOUROKU(149), - K_OEM_FJ_LOYA(150), - __UNASSIGNED_97(151), - __UNASSIGNED_98(152), - __UNASSIGNED_99(153), - __UNASSIGNED_9A(154), - __UNASSIGNED_9B(155), - __UNASSIGNED_9C(156), - __UNASSIGNED_9D(157), - __UNASSIGNED_9E(158), - __UNASSIGNED_9F(159), - K_LSHIFT(160), - K_RSHIFT(161), - K_LCONTROL(162), - K_RCONTROL(163), - K_LMENU(164), - K_RMENU(165), - K_BROWSER_BACK(166), - K_BROWSER_FORWARD(167), - K_BROWSER_REFRESH(168), - K_BROWSER_STOP(169), - K_BROWSER_SEARCH(170), - K_BROWSER_FAVORITES(171), - K_BROWSER_HOME(172), - K_VOLUME_MUTE(173), - K_VOLUME_DOWN(174), - K_VOLUME_UP(175), - K_MEDIA_NEXT_TRACK(176), - K_MEDIA_PREV_TRACK(177), - K_MEDIA_STOP(178), - K_MEDIA_PLAY_PAUSE(179), - K_LAUNCH_MAIL(180), - K_LAUNCH_MEDIA_SELECT(181), - K_LAUNCH_APP1(182), - K_LAUNCH_APP2(183), - __RESERVED_B8(184), - __RESERVED_B9(185), - K_OEM_1(186), - K_OEM_PLUS(187), - K_OEM_COMMA(188), - K_OEM_MINUS(189), - K_OEM_PERIOD(190), - K_OEM_2(191), - K_OEM_3(192), - K_OEM_4(219), - K_OEM_5(220), - K_OEM_6(221), - K_OEM_7(222), - K_OEM_8(223), - __RESERVED_E0(224), - K_OEM_AX(225), - K_OEM_102(226), - K_ICO_HELP(227), - K_ICO_00(228), - K_PROCESSKEY(229), - K_ICO_CLEAR(230), - K_PACKET(231), - __UNASSIGNED_E8(232), - K_OEM_RESET(233), - K_OEM_JUMP(234), - K_OEM_PA1(235), - K_OEM_PA2(236), - K_OEM_PA3(237), - K_OEM_WSCTRL(238), - K_OEM_CUSEL(239), - K_OEM_ATTN(240), - K_OEM_FINISH(241), - K_OEM_COPY(242), - K_OEM_AUTO(243), - K_OEM_ENLW(244), - K_OEM_BACKTAB(245), - K_ATTN(246), - K_CRSEL(247), - K_EXSEL(248), - K_EREOF(249), - K_PLAY(250), - K_ZOOM(251), - K_NONAME(252), - K_PA1(253), - K_OEM_CLEAR(254); - - private int value; - - public int getValue(){ - return value; - } - - Key(int value){ - this.value = value; - } - -} diff --git a/generated/bwapi4/Latency/Enum.java b/generated/bwapi4/Latency/Enum.java deleted file mode 100644 index 6bb6bc2..0000000 --- a/generated/bwapi4/Latency/Enum.java +++ /dev/null @@ -1,29 +0,0 @@ -package bwapi4.Latency; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public enum Enum { - - SinglePlayer(2), - LanLow(5), - LanMedium(7), - LanHigh(9), - BattlenetLow(14), - BattlenetMedium(19); - - private int value; - - public int getValue(){ - return value; - } - - Enum(int value){ - this.value = value; - } - -} diff --git a/generated/bwapi4/Mirror.java b/generated/bwapi4/Mirror.java deleted file mode 100644 index 59235f0..0000000 --- a/generated/bwapi4/Mirror.java +++ /dev/null @@ -1,262 +0,0 @@ -package bwapi4; - -import bwapi4.AIModule; -import bwapi4.BWEventListener; - -import java.io.*; -import java.io.File; -import java.lang.Exception; -import java.lang.UnsupportedOperationException; -import java.util.*; -import java.util.zip.*; - -/** - *

The API entry point. Standard use case:

- *
    - *
  • Create a Mirror object and use {@link #getModule()} and then set an {@link AIModule}'s {@link BWEventListener}
    - *
  • Call {@link #startGame()} to init the API and connect to Broodwar, then launch Broodwar from ChaosLauncher.
  • - *
  • In you {@link BWEventListener#onStart()} method, receive the Game object by calling {@link #getGame()}
  • - *
- *
- * Example - *
- *     {@code
- *
- *     mirror.getModule().setEventListener(new DefaultBWListener()
- *     {
- *            public void onStart() {
- *                game = mirror.getGame();
- *                self = game.self();
- *                //initialization
- *                ....
- *            }
- *
- *           public void onUpdate() {
- *               for (Unit myUnit : self.getUnits()) {
- *                   //give orders to unit
- *                   ...
- *                }
- *           }
- *        });
- *     }
- *     mirror.startGame();
- * 
- - *

Note: The Game object is initialized during the {@link #startGame()} as well as other BWMirror API's constants. - * Do not use any API releated methods/fields prior to {@link #startGame()}.

- - */ -public class Mirror { - - private Game game; - - private AIModule module = new AIModule(); - - private FrameCallback frameCallback; - - private static final boolean EXTRACT_JAR = true; - - private static final String VERSION = "2_0"; - - static { - String arch = System.getProperty("os.arch"); - String dllNames[] = {"BWAPI4", "gmp-vc90-mt", "mpfr-vc90-mt"}; - if(!arch.equals("x86")){ - throw new UnsupportedOperationException("BWMirror API supports only x86 architecture."); - } - try { - if (EXTRACT_JAR) { - System.setProperty("java.library.path", "."); - java.lang.reflect.Field fieldSysPath = ClassLoader.class.getDeclaredField("sys_paths"); - fieldSysPath.setAccessible(true); - fieldSysPath.set(null, null); - - String path = Mirror.class.getProtectionDomain().getCodeSource().getLocation().getPath(); - String decodedPath = java.net.URLDecoder.decode(path, "UTF-8"); - - for (String dllName : dllNames) { - String dllNameExt = dllName + ".dll"; - if (!new File(dllNameExt).exists()) { - JarResources jar = new JarResources(path); - byte[] correctDllData = jar.getResource(dllNameExt); - FileOutputStream funnyStream = new FileOutputStream(dllNameExt); - funnyStream.write(correctDllData); - funnyStream.close(); - } - } - } - } catch (Exception e) { - System.err.println("Failed to extract native libraries.\n" + e); - } - - System.loadLibrary(dllNames[0]); - - File dataDir = new File("bwapi-data/BWTA"); - if(!dataDir.exists()){ - try { - dataDir.mkdirs(); - } catch (Exception e) { - System.err.println("Unable to create /bwapi-data/BWTA folder, BWTA analysis will not be saved."); - } - } - } - - public Game getGame() { - return game; - } - - public AIModule getModule() { - return module; - } - - /** - * Starts the API, initializes all constants ( {@link UnitType}, {@link WeaponType} ) and the {@link Game} object. - * This method blocks until the end of game. - */ - public native void startGame(); - - private void update() { - if (frameCallback != null) { - frameCallback.update(); - } - } - - /*public void setFrameCallback(bwapi.Mirror.FrameCallback frameCallback) { - this.frameCallback = frameCallback; - } */ - - /** - * The simplest interface to receive update event from Broodwar. The {@link #update()} method is called once each frame. - * For a simple bot and implementation of this interface is enough, to receive all in game events, implement {@link BWEventListener}. - */ - /*public*/ private interface FrameCallback { - public void update(); - } - - @SuppressWarnings({"unchecked"}) - private static class JarResources { - - // external debug flag - public boolean debugOn = false; - - // jar resource mapping tables - private Hashtable htSizes = new Hashtable(); - private Hashtable htJarContents = new Hashtable(); - - // a jar file - private String jarFileName; - - /** - * creates a javabot.JarResources. It extracts all resources from a Jar - * into an internal hashtable, keyed by resource names. - * - * @param jarFileName a jar or zip file - */ - public JarResources(String jarFileName) { - this.jarFileName = jarFileName; - init(); - } - - /** - * Extracts a jar resource as a blob. - * - * @param name a resource name. - */ - public byte[] getResource(String name) { - return (byte[]) htJarContents.get(name); - } - - /** - * initializes internal hash tables with Jar file resources. - */ - private void init() { - try { - // extracts just sizes only. - ZipFile zf = new ZipFile(jarFileName); - Enumeration e = zf.entries(); - while (e.hasMoreElements()) { - ZipEntry ze = (ZipEntry) e.nextElement(); - if (debugOn) { - System.out.println(dumpZipEntry(ze)); - } - htSizes.put(ze.getName(), new Integer((int) ze.getSize())); - } - zf.close(); - - // extract resources and put them into the hashtable. - FileInputStream fis = new FileInputStream(jarFileName); - BufferedInputStream bis = new BufferedInputStream(fis); - ZipInputStream zis = new ZipInputStream(bis); - ZipEntry ze = null; - while ((ze = zis.getNextEntry()) != null) { - if (ze.isDirectory()) { - continue; - } - if (debugOn) { - System.out.println( - "ze.getName()=" + ze.getName() + "," + "getSize()=" + ze.getSize() - ); - } - int size = (int) ze.getSize(); - // -1 means unknown size. - if (size == -1) { - size = ((Integer) htSizes.get(ze.getName())).intValue(); - } - byte[] b = new byte[(int) size]; - int rb = 0; - int chunk = 0; - while (((int) size - rb) > 0) { - chunk = zis.read(b, rb, (int) size - rb); - if (chunk == -1) { - break; - } - rb += chunk; - } - // add to internal resource hashtable - htJarContents.put(ze.getName(), b); - if (debugOn) { - System.out.println( - ze.getName() + " rb=" + rb + - ",size=" + size + - ",csize=" + ze.getCompressedSize() - ); - } - } - } catch (NullPointerException e) { - System.out.println("done."); - } catch (FileNotFoundException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } - } - - /** - * Dumps a zip entry into a string. - * - * @param ze a ZipEntry - */ - private String dumpZipEntry(ZipEntry ze) { - StringBuffer sb = new StringBuffer(); - if (ze.isDirectory()) { - sb.append("d "); - } else { - sb.append("f "); - } - if (ze.getMethod() == ZipEntry.STORED) { - sb.append("stored "); - } else { - sb.append("defalted "); - } - sb.append(ze.getName()); - sb.append("\t"); - sb.append("" + ze.getSize()); - if (ze.getMethod() == ZipEntry.DEFLATED) { - sb.append("/" + ze.getCompressedSize()); - } - return (sb.toString()); - } - - - } -} \ No newline at end of file diff --git a/generated/bwapi4/MouseButton.java b/generated/bwapi4/MouseButton.java deleted file mode 100644 index a93843a..0000000 --- a/generated/bwapi4/MouseButton.java +++ /dev/null @@ -1,27 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public enum MouseButton { - - M_LEFT(0), - M_RIGHT(1), - M_MIDDLE(2), - M_MAX(3); - - private int value; - - public int getValue(){ - return value; - } - - MouseButton(int value){ - this.value = value; - } - -} diff --git a/generated/bwapi4/Order.java b/generated/bwapi4/Order.java deleted file mode 100644 index 7986a9c..0000000 --- a/generated/bwapi4/Order.java +++ /dev/null @@ -1,346 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Order { - - public static Order Die; - - public static Order Stop; - - public static Order Guard; - - public static Order PlayerGuard; - - public static Order TurretGuard; - - public static Order BunkerGuard; - - public static Order Move; - - public static Order AttackUnit; - - public static Order AttackTile; - - public static Order Hover; - - public static Order AttackMove; - - public static Order InfestedCommandCenter; - - public static Order UnusedNothing; - - public static Order UnusedPowerup; - - public static Order TowerGuard; - - public static Order VultureMine; - - public static Order Nothing; - - public static Order CastInfestation; - - public static Order InfestingCommandCenter; - - public static Order PlaceBuilding; - - public static Order CreateProtossBuilding; - - public static Order ConstructingBuilding; - - public static Order Repair; - - public static Order PlaceAddon; - - public static Order BuildAddon; - - public static Order Train; - - public static Order RallyPointUnit; - - public static Order RallyPointTile; - - public static Order ZergBirth; - - public static Order ZergUnitMorph; - - public static Order ZergBuildingMorph; - - public static Order IncompleteBuilding; - - public static Order BuildNydusExit; - - public static Order EnterNydusCanal; - - public static Order Follow; - - public static Order Carrier; - - public static Order ReaverCarrierMove; - - public static Order CarrierIgnore2; - - public static Order Reaver; - - public static Order TrainFighter; - - public static Order InterceptorAttack; - - public static Order ScarabAttack; - - public static Order RechargeShieldsUnit; - - public static Order RechargeShieldsBattery; - - public static Order ShieldBattery; - - public static Order InterceptorReturn; - - public static Order BuildingLand; - - public static Order BuildingLiftOff; - - public static Order DroneLiftOff; - - public static Order LiftingOff; - - public static Order ResearchTech; - - public static Order Upgrade; - - public static Order Larva; - - public static Order SpawningLarva; - - public static Order Harvest1; - - public static Order Harvest2; - - public static Order MoveToGas; - - public static Order WaitForGas; - - public static Order HarvestGas; - - public static Order ReturnGas; - - public static Order MoveToMinerals; - - public static Order WaitForMinerals; - - public static Order MiningMinerals; - - public static Order Harvest3; - - public static Order Harvest4; - - public static Order ReturnMinerals; - - public static Order Interrupted; - - public static Order EnterTransport; - - public static Order PickupIdle; - - public static Order PickupTransport; - - public static Order PickupBunker; - - public static Order Pickup4; - - public static Order PowerupIdle; - - public static Order Sieging; - - public static Order Unsieging; - - public static Order InitCreepGrowth; - - public static Order SpreadCreep; - - public static Order StoppingCreepGrowth; - - public static Order GuardianAspect; - - public static Order ArchonWarp; - - public static Order CompletingArchonSummon; - - public static Order HoldPosition; - - public static Order Cloak; - - public static Order Decloak; - - public static Order Unload; - - public static Order MoveUnload; - - public static Order FireYamatoGun; - - public static Order CastLockdown; - - public static Order Burrowing; - - public static Order Burrowed; - - public static Order Unburrowing; - - public static Order CastDarkSwarm; - - public static Order CastParasite; - - public static Order CastSpawnBroodlings; - - public static Order CastEMPShockwave; - - public static Order NukeWait; - - public static Order NukeTrain; - - public static Order NukeLaunch; - - public static Order NukePaint; - - public static Order NukeUnit; - - public static Order CastNuclearStrike; - - public static Order NukeTrack; - - public static Order CloakNearbyUnits; - - public static Order PlaceMine; - - public static Order RightClickAction; - - public static Order CastRecall; - - public static Order Teleport; - - public static Order CastScannerSweep; - - public static Order Scanner; - - public static Order CastDefensiveMatrix; - - public static Order CastPsionicStorm; - - public static Order CastIrradiate; - - public static Order CastPlague; - - public static Order CastConsume; - - public static Order CastEnsnare; - - public static Order CastStasisField; - - public static Order CastHallucination; - - public static Order Hallucination2; - - public static Order ResetCollision; - - public static Order Patrol; - - public static Order CTFCOPInit; - - public static Order CTFCOPStarted; - - public static Order CTFCOP2; - - public static Order ComputerAI; - - public static Order AtkMoveEP; - - public static Order HarassMove; - - public static Order AIPatrol; - - public static Order GuardPost; - - public static Order RescuePassive; - - public static Order Neutral; - - public static Order ComputerReturn; - - public static Order SelfDestructing; - - public static Order Critter; - - public static Order HiddenGun; - - public static Order OpenDoor; - - public static Order CloseDoor; - - public static Order HideTrap; - - public static Order RevealTrap; - - public static Order EnableDoodad; - - public static Order DisableDoodad; - - public static Order WarpIn; - - public static Order Medic; - - public static Order MedicHeal; - - public static Order HealMove; - - public static Order MedicHealToIdle; - - public static Order CastRestoration; - - public static Order CastDisruptionWeb; - - public static Order CastMindControl; - - public static Order DarkArchonMeld; - - public static Order CastFeedback; - - public static Order CastOpticalFlare; - - public static Order CastMaelstrom; - - public static Order JunkYardDog; - - public static Order Fatal; - - public static Order None; - - public static Order Unknown; - - - private static Map instances = new HashMap(); - - private Order(long pointer) { - this.pointer = pointer; - } - - private static Order get(long pointer) { - if (pointer == 0 ) { - return null; - } - Order instance = instances.get(pointer); - if (instance == null ) { - instance = new Order(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - -} diff --git a/generated/bwapi4/Player.java b/generated/bwapi4/Player.java deleted file mode 100644 index ba47b47..0000000 --- a/generated/bwapi4/Player.java +++ /dev/null @@ -1,400 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Player { - - public int getID() { - return getID_native(pointer); - } - - public String getName() { - return getName_native(pointer); - } - - public List getUnits() { - return getUnits_native(pointer); - } - - public Race getRace() { - return getRace_native(pointer); - } - - public PlayerType getType() { - return getType_native(pointer); - } - - public Force getForce() { - return getForce_native(pointer); - } - - public boolean isAlly(Player player) { - return isAlly_native(pointer, player); - } - - public boolean isEnemy(Player player) { - return isEnemy_native(pointer, player); - } - - public boolean isNeutral() { - return isNeutral_native(pointer); - } - - public TilePosition getStartLocation() { - return getStartLocation_native(pointer); - } - - public boolean isVictorious() { - return isVictorious_native(pointer); - } - - public boolean isDefeated() { - return isDefeated_native(pointer); - } - - public boolean leftGame() { - return leftGame_native(pointer); - } - - public int minerals() { - return minerals_native(pointer); - } - - public int gas() { - return gas_native(pointer); - } - - public int gatheredMinerals() { - return gatheredMinerals_native(pointer); - } - - public int gatheredGas() { - return gatheredGas_native(pointer); - } - - public int repairedMinerals() { - return repairedMinerals_native(pointer); - } - - public int repairedGas() { - return repairedGas_native(pointer); - } - - public int refundedMinerals() { - return refundedMinerals_native(pointer); - } - - public int refundedGas() { - return refundedGas_native(pointer); - } - - public int spentMinerals() { - return spentMinerals_native(pointer); - } - - public int spentGas() { - return spentGas_native(pointer); - } - - public int supplyTotal() { - return supplyTotal_native(pointer); - } - - public int supplyTotal(Race race) { - return supplyTotal_native(pointer, race); - } - - public int supplyUsed() { - return supplyUsed_native(pointer); - } - - public int supplyUsed(Race race) { - return supplyUsed_native(pointer, race); - } - - public int allUnitCount() { - return allUnitCount_native(pointer); - } - - public int allUnitCount(UnitType unit) { - return allUnitCount_native(pointer, unit); - } - - public int visibleUnitCount() { - return visibleUnitCount_native(pointer); - } - - public int visibleUnitCount(UnitType unit) { - return visibleUnitCount_native(pointer, unit); - } - - public int completedUnitCount() { - return completedUnitCount_native(pointer); - } - - public int completedUnitCount(UnitType unit) { - return completedUnitCount_native(pointer, unit); - } - - public int incompleteUnitCount() { - return incompleteUnitCount_native(pointer); - } - - public int incompleteUnitCount(UnitType unit) { - return incompleteUnitCount_native(pointer, unit); - } - - public int deadUnitCount() { - return deadUnitCount_native(pointer); - } - - public int deadUnitCount(UnitType unit) { - return deadUnitCount_native(pointer, unit); - } - - public int killedUnitCount() { - return killedUnitCount_native(pointer); - } - - public int killedUnitCount(UnitType unit) { - return killedUnitCount_native(pointer, unit); - } - - public int getUpgradeLevel(UpgradeType upgrade) { - return getUpgradeLevel_native(pointer, upgrade); - } - - public boolean hasResearched(TechType tech) { - return hasResearched_native(pointer, tech); - } - - public boolean isResearching(TechType tech) { - return isResearching_native(pointer, tech); - } - - public boolean isUpgrading(UpgradeType upgrade) { - return isUpgrading_native(pointer, upgrade); - } - - public Color getColor() { - return getColor_native(pointer); - } - - public char getTextColor() { - return getTextColor_native(pointer); - } - - public int maxEnergy(UnitType unit) { - return maxEnergy_native(pointer, unit); - } - - public double topSpeed(UnitType unit) { - return topSpeed_native(pointer, unit); - } - - public int weaponMaxRange(WeaponType weapon) { - return weaponMaxRange_native(pointer, weapon); - } - - public int sightRange(UnitType unit) { - return sightRange_native(pointer, unit); - } - - public int weaponDamageCooldown(UnitType unit) { - return weaponDamageCooldown_native(pointer, unit); - } - - public int armor(UnitType unit) { - return armor_native(pointer, unit); - } - - public int damage(WeaponType wpn) { - return damage_native(pointer, wpn); - } - - public int getUnitScore() { - return getUnitScore_native(pointer); - } - - public int getKillScore() { - return getKillScore_native(pointer); - } - - public int getBuildingScore() { - return getBuildingScore_native(pointer); - } - - public int getRazingScore() { - return getRazingScore_native(pointer); - } - - public int getCustomScore() { - return getCustomScore_native(pointer); - } - - public boolean isObserver() { - return isObserver_native(pointer); - } - - public int getMaxUpgradeLevel(UpgradeType upgrade) { - return getMaxUpgradeLevel_native(pointer, upgrade); - } - - public boolean isResearchAvailable(TechType tech) { - return isResearchAvailable_native(pointer, tech); - } - - public boolean isUnitAvailable(UnitType unit) { - return isUnitAvailable_native(pointer, unit); - } - - - private static Map instances = new HashMap(); - - private Player(long pointer) { - this.pointer = pointer; - } - - private static Player get(long pointer) { - if (pointer == 0 ) { - return null; - } - Player instance = instances.get(pointer); - if (instance == null ) { - instance = new Player(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native int getID_native(long pointer); - - private native String getName_native(long pointer); - - private native List getUnits_native(long pointer); - - private native Race getRace_native(long pointer); - - private native PlayerType getType_native(long pointer); - - private native Force getForce_native(long pointer); - - private native boolean isAlly_native(long pointer, Player player); - - private native boolean isEnemy_native(long pointer, Player player); - - private native boolean isNeutral_native(long pointer); - - private native TilePosition getStartLocation_native(long pointer); - - private native boolean isVictorious_native(long pointer); - - private native boolean isDefeated_native(long pointer); - - private native boolean leftGame_native(long pointer); - - private native int minerals_native(long pointer); - - private native int gas_native(long pointer); - - private native int gatheredMinerals_native(long pointer); - - private native int gatheredGas_native(long pointer); - - private native int repairedMinerals_native(long pointer); - - private native int repairedGas_native(long pointer); - - private native int refundedMinerals_native(long pointer); - - private native int refundedGas_native(long pointer); - - private native int spentMinerals_native(long pointer); - - private native int spentGas_native(long pointer); - - private native int supplyTotal_native(long pointer); - - private native int supplyTotal_native(long pointer, Race race); - - private native int supplyUsed_native(long pointer); - - private native int supplyUsed_native(long pointer, Race race); - - private native int allUnitCount_native(long pointer); - - private native int allUnitCount_native(long pointer, UnitType unit); - - private native int visibleUnitCount_native(long pointer); - - private native int visibleUnitCount_native(long pointer, UnitType unit); - - private native int completedUnitCount_native(long pointer); - - private native int completedUnitCount_native(long pointer, UnitType unit); - - private native int incompleteUnitCount_native(long pointer); - - private native int incompleteUnitCount_native(long pointer, UnitType unit); - - private native int deadUnitCount_native(long pointer); - - private native int deadUnitCount_native(long pointer, UnitType unit); - - private native int killedUnitCount_native(long pointer); - - private native int killedUnitCount_native(long pointer, UnitType unit); - - private native int getUpgradeLevel_native(long pointer, UpgradeType upgrade); - - private native boolean hasResearched_native(long pointer, TechType tech); - - private native boolean isResearching_native(long pointer, TechType tech); - - private native boolean isUpgrading_native(long pointer, UpgradeType upgrade); - - private native Color getColor_native(long pointer); - - private native char getTextColor_native(long pointer); - - private native int maxEnergy_native(long pointer, UnitType unit); - - private native double topSpeed_native(long pointer, UnitType unit); - - private native int weaponMaxRange_native(long pointer, WeaponType weapon); - - private native int sightRange_native(long pointer, UnitType unit); - - private native int weaponDamageCooldown_native(long pointer, UnitType unit); - - private native int armor_native(long pointer, UnitType unit); - - private native int damage_native(long pointer, WeaponType wpn); - - private native int getUnitScore_native(long pointer); - - private native int getKillScore_native(long pointer); - - private native int getBuildingScore_native(long pointer); - - private native int getRazingScore_native(long pointer); - - private native int getCustomScore_native(long pointer); - - private native boolean isObserver_native(long pointer); - - private native int getMaxUpgradeLevel_native(long pointer, UpgradeType upgrade); - - private native boolean isResearchAvailable_native(long pointer, TechType tech); - - private native boolean isUnitAvailable_native(long pointer, UnitType unit); - - -} diff --git a/generated/bwapi4/PlayerType.java b/generated/bwapi4/PlayerType.java deleted file mode 100644 index ef247f6..0000000 --- a/generated/bwapi4/PlayerType.java +++ /dev/null @@ -1,74 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class PlayerType { - - public String toString() { - return toString_native(pointer); - } - - public boolean isLobbyType() { - return isLobbyType_native(pointer); - } - - public boolean isGameType() { - return isGameType_native(pointer); - } - - public static PlayerType None; - - public static PlayerType Computer; - - public static PlayerType Player; - - public static PlayerType RescuePassive; - - public static PlayerType EitherPreferComputer; - - public static PlayerType EitherPreferHuman; - - public static PlayerType Neutral; - - public static PlayerType Closed; - - public static PlayerType PlayerLeft; - - public static PlayerType ComputerLeft; - - public static PlayerType Unknown; - - - private static Map instances = new HashMap(); - - private PlayerType(long pointer) { - this.pointer = pointer; - } - - private static PlayerType get(long pointer) { - if (pointer == 0 ) { - return null; - } - PlayerType instance = instances.get(pointer); - if (instance == null ) { - instance = new PlayerType(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String toString_native(long pointer); - - private native boolean isLobbyType_native(long pointer); - - private native boolean isGameType_native(long pointer); - - -} diff --git a/generated/bwapi4/Playerset.java b/generated/bwapi4/Playerset.java deleted file mode 100644 index 3c3d885..0000000 --- a/generated/bwapi4/Playerset.java +++ /dev/null @@ -1,58 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Playerset { - - public List getUnits() { - return getUnits_native(pointer); - } - - public void setAlliance(boolean allies) { - setAlliance_native(pointer, allies); - } - - public void setAlliance() { - setAlliance_native(pointer); - } - - public void setAlliance(boolean allies, boolean alliedVictory) { - setAlliance_native(pointer, allies, alliedVictory); - } - - - private static Map instances = new HashMap(); - - private Playerset(long pointer) { - this.pointer = pointer; - } - - private static Playerset get(long pointer) { - if (pointer == 0 ) { - return null; - } - Playerset instance = instances.get(pointer); - if (instance == null ) { - instance = new Playerset(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native List getUnits_native(long pointer); - - private native void setAlliance_native(long pointer, boolean allies); - - private native void setAlliance_native(long pointer); - - private native void setAlliance_native(long pointer, boolean allies, boolean alliedVictory); - - -} diff --git a/generated/bwapi4/Position.java b/generated/bwapi4/Position.java deleted file mode 100644 index cf68087..0000000 --- a/generated/bwapi4/Position.java +++ /dev/null @@ -1,86 +0,0 @@ -package bwapi4; - -import java.lang.Override; -import java.util.HashMap; -import java.util.Map; - -/** - * Positions are measured in pixels and are the highest resolution. - */ -public class Position extends AbstractPoint{ - - private int x, y; - - public Position(int x, int y) { - this.x = x; - this.y = y; - } - - public String toString() { - return "[" + x + ", " + y + "]"; - } - - public native boolean isValid(); - - public native Position makeValid(); - - public native int getApproxDistance(Position position); - - public native double getLength(); - - public int getX() { - return x; - } - - public int getY() { - return y; - } - - public static Position Invalid; - - public static Position None; - - public static Position Unknown; - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof Position)) return false; - - Position position = (Position) o; - - if (x != position.x) return false; - if (y != position.y) return false; - - return true; - } - - @Override - public int hashCode() { - int result = x; - result = 31 * result + y; - return result; - } - - - private static Map instances = new HashMap(); - - private Position(long pointer) { - this.pointer = pointer; - } - - private static Position get(long pointer) { - Position instance = instances.get(pointer); - if (instance == null) { - instance = new Position(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - public Position getPoint(){ - return this; - } -} \ No newline at end of file diff --git a/generated/bwapi4/PositionOrUnit.java b/generated/bwapi4/PositionOrUnit.java deleted file mode 100644 index b371c13..0000000 --- a/generated/bwapi4/PositionOrUnit.java +++ /dev/null @@ -1,55 +0,0 @@ -package bwapi4; - -import java.lang.IllegalArgumentException; -import java.lang.Object; -import java.lang.Override; - -public class PositionOrUnit { - - private Unit unit; - - private Position position; - - public PositionOrUnit(Unit unit){ - if(unit == null){ - throw new IllegalArgumentException("PositionOrUnit must not reference null!"); - }; - this.unit = unit; - } - - public PositionOrUnit(Position position){ - if(position == null){ - throw new IllegalArgumentException("PositionOrUnit must not reference null!"); - }; - this.position = position; - } - - public Unit getUnit(){ - return unit; - } - - public Position getPosition() { - return position; - } - - public boolean isUnit(){ - return unit != null; - } - - public boolean isPosition(){ - return position != null; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof PositionOrUnit)) return false; - - PositionOrUnit that = (PositionOrUnit) o; - - if (position != null ? !position.equals(that.position) : that.position != null) return false; - if (unit != null ? !unit.equals(that.unit) : that.unit != null) return false; - - return true; - } -} \ No newline at end of file diff --git a/generated/bwapi4/PositionedObject.java b/generated/bwapi4/PositionedObject.java deleted file mode 100644 index d739a6a..0000000 --- a/generated/bwapi4/PositionedObject.java +++ /dev/null @@ -1,15 +0,0 @@ -package bwapi4; - -import bwapi4.Position; - -/** - * Interrmediate class used to translate getPoint() calls to getPosition() calls. - */ -public abstract class PositionedObject extends AbstractPoint { - - public Position getPoint(){ - return getPosition(); - } - - public abstract Position getPosition(); -} \ No newline at end of file diff --git a/generated/bwapi4/Race.java b/generated/bwapi4/Race.java deleted file mode 100644 index 578a3ae..0000000 --- a/generated/bwapi4/Race.java +++ /dev/null @@ -1,82 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Race { - - public String toString() { - return toString_native(pointer); - } - - public UnitType getWorker() { - return getWorker_native(pointer); - } - - public UnitType getCenter() { - return getCenter_native(pointer); - } - - public UnitType getRefinery() { - return getRefinery_native(pointer); - } - - public UnitType getTransport() { - return getTransport_native(pointer); - } - - public UnitType getSupplyProvider() { - return getSupplyProvider_native(pointer); - } - - public static Race Zerg; - - public static Race Terran; - - public static Race Protoss; - - public static Race Random; - - public static Race None; - - public static Race Unknown; - - - private static Map instances = new HashMap(); - - private Race(long pointer) { - this.pointer = pointer; - } - - private static Race get(long pointer) { - if (pointer == 0 ) { - return null; - } - Race instance = instances.get(pointer); - if (instance == null ) { - instance = new Race(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String toString_native(long pointer); - - private native UnitType getWorker_native(long pointer); - - private native UnitType getCenter_native(long pointer); - - private native UnitType getRefinery_native(long pointer); - - private native UnitType getTransport_native(long pointer); - - private native UnitType getSupplyProvider_native(long pointer); - - -} diff --git a/generated/bwapi4/Region.java b/generated/bwapi4/Region.java deleted file mode 100644 index ecda2f3..0000000 --- a/generated/bwapi4/Region.java +++ /dev/null @@ -1,120 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; -import bwapi4.CenteredObject; - -public class Region extends CenteredObject -{ - - public int getID() { - return getID_native(pointer); - } - - public int getRegionGroupID() { - return getRegionGroupID_native(pointer); - } - - public Position getCenter() { - return getCenter_native(pointer); - } - - public boolean isHigherGround() { - return isHigherGround_native(pointer); - } - - public int getDefensePriority() { - return getDefensePriority_native(pointer); - } - - public boolean isAccessible() { - return isAccessible_native(pointer); - } - - public List getNeighbors() { - return getNeighbors_native(pointer); - } - - public int getBoundsLeft() { - return getBoundsLeft_native(pointer); - } - - public int getBoundsTop() { - return getBoundsTop_native(pointer); - } - - public int getBoundsRight() { - return getBoundsRight_native(pointer); - } - - public int getBoundsBottom() { - return getBoundsBottom_native(pointer); - } - - public Region getClosestAccessibleRegion() { - return getClosestAccessibleRegion_native(pointer); - } - - public Region getClosestInaccessibleRegion() { - return getClosestInaccessibleRegion_native(pointer); - } - - public int getDistance(Region other) { - return getDistance_native(pointer, other); - } - - - private static Map instances = new HashMap(); - - private Region(long pointer) { - this.pointer = pointer; - } - - private static Region get(long pointer) { - if (pointer == 0 ) { - return null; - } - Region instance = instances.get(pointer); - if (instance == null ) { - instance = new Region(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native int getID_native(long pointer); - - private native int getRegionGroupID_native(long pointer); - - private native Position getCenter_native(long pointer); - - private native boolean isHigherGround_native(long pointer); - - private native int getDefensePriority_native(long pointer); - - private native boolean isAccessible_native(long pointer); - - private native List getNeighbors_native(long pointer); - - private native int getBoundsLeft_native(long pointer); - - private native int getBoundsTop_native(long pointer); - - private native int getBoundsRight_native(long pointer); - - private native int getBoundsBottom_native(long pointer); - - private native Region getClosestAccessibleRegion_native(long pointer); - - private native Region getClosestInaccessibleRegion_native(long pointer); - - private native int getDistance_native(long pointer, Region other); - - -} diff --git a/generated/bwapi4/Regionset.java b/generated/bwapi4/Regionset.java deleted file mode 100644 index 574730c..0000000 --- a/generated/bwapi4/Regionset.java +++ /dev/null @@ -1,40 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Regionset { - - public Position getCenter() { - return getCenter_native(pointer); - } - - - private static Map instances = new HashMap(); - - private Regionset(long pointer) { - this.pointer = pointer; - } - - private static Regionset get(long pointer) { - if (pointer == 0 ) { - return null; - } - Regionset instance = instances.get(pointer); - if (instance == null ) { - instance = new Regionset(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native Position getCenter_native(long pointer); - - -} diff --git a/generated/bwapi4/ShapeType/Enum.java b/generated/bwapi4/ShapeType/Enum.java deleted file mode 100644 index 9118876..0000000 --- a/generated/bwapi4/ShapeType/Enum.java +++ /dev/null @@ -1,30 +0,0 @@ -package bwapi4.ShapeType; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public enum Enum { - - None(0), - Text(1), - Box(2), - Triangle(3), - Circle(4), - Ellipse(5), - Dot(6); - - private int value; - - public int getValue(){ - return value; - } - - Enum(int value){ - this.value = value; - } - -} diff --git a/generated/bwapi4/TechType.java b/generated/bwapi4/TechType.java deleted file mode 100644 index 8cff9e5..0000000 --- a/generated/bwapi4/TechType.java +++ /dev/null @@ -1,172 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class TechType { - - public String toString() { - return toString_native(pointer); - } - - public Race getRace() { - return getRace_native(pointer); - } - - public int mineralPrice() { - return mineralPrice_native(pointer); - } - - public int gasPrice() { - return gasPrice_native(pointer); - } - - public int researchTime() { - return researchTime_native(pointer); - } - - public int energyCost() { - return energyCost_native(pointer); - } - - public UnitType whatResearches() { - return whatResearches_native(pointer); - } - - public WeaponType getWeapon() { - return getWeapon_native(pointer); - } - - public boolean targetsUnit() { - return targetsUnit_native(pointer); - } - - public boolean targetsPosition() { - return targetsPosition_native(pointer); - } - - public Order getOrder() { - return getOrder_native(pointer); - } - - public static TechType Stim_Packs; - - public static TechType Lockdown; - - public static TechType EMP_Shockwave; - - public static TechType Spider_Mines; - - public static TechType Scanner_Sweep; - - public static TechType Tank_Siege_Mode; - - public static TechType Defensive_Matrix; - - public static TechType Irradiate; - - public static TechType Yamato_Gun; - - public static TechType Cloaking_Field; - - public static TechType Personnel_Cloaking; - - public static TechType Burrowing; - - public static TechType Infestation; - - public static TechType Spawn_Broodlings; - - public static TechType Dark_Swarm; - - public static TechType Plague; - - public static TechType Consume; - - public static TechType Ensnare; - - public static TechType Parasite; - - public static TechType Psionic_Storm; - - public static TechType Hallucination; - - public static TechType Recall; - - public static TechType Stasis_Field; - - public static TechType Archon_Warp; - - public static TechType Restoration; - - public static TechType Disruption_Web; - - public static TechType Mind_Control; - - public static TechType Dark_Archon_Meld; - - public static TechType Feedback; - - public static TechType Optical_Flare; - - public static TechType Maelstrom; - - public static TechType Lurker_Aspect; - - public static TechType Healing; - - public static TechType None; - - public static TechType Nuclear_Strike; - - public static TechType Unknown; - - - private static Map instances = new HashMap(); - - private TechType(long pointer) { - this.pointer = pointer; - } - - private static TechType get(long pointer) { - if (pointer == 0 ) { - return null; - } - TechType instance = instances.get(pointer); - if (instance == null ) { - instance = new TechType(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String toString_native(long pointer); - - private native Race getRace_native(long pointer); - - private native int mineralPrice_native(long pointer); - - private native int gasPrice_native(long pointer); - - private native int researchTime_native(long pointer); - - private native int energyCost_native(long pointer); - - private native UnitType whatResearches_native(long pointer); - - private native WeaponType getWeapon_native(long pointer); - - private native boolean targetsUnit_native(long pointer); - - private native boolean targetsPosition_native(long pointer); - - private native Order getOrder_native(long pointer); - - -} diff --git a/generated/bwapi4/Text/Enum.java b/generated/bwapi4/Text/Enum.java deleted file mode 100644 index 8eee27e..0000000 --- a/generated/bwapi4/Text/Enum.java +++ /dev/null @@ -1,49 +0,0 @@ -package bwapi4.Text; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public enum Enum { - - Previous(1), - Default(2), - Yellow(3), - White(4), - Grey(5), - Red(6), - Green(7), - BrightRed(8), - Invisible(11), - Blue(14), - Teal(15), - Purple(16), - Orange(17), - Align_Right(18), - Align_Center(19), - Invisible2(20), - Brown(21), - PlayerWhite(22), - PlayerYellow(23), - DarkGreen(24), - LightYellow(25), - Cyan(26), - Tan(27), - GreyBlue(28), - GreyGreen(29), - GreyCyan(30); - - private int value; - - public int getValue(){ - return value; - } - - Enum(int value){ - this.value = value; - } - -} diff --git a/generated/bwapi4/Text/Size/Enum.java b/generated/bwapi4/Text/Size/Enum.java deleted file mode 100644 index 85e1db4..0000000 --- a/generated/bwapi4/Text/Size/Enum.java +++ /dev/null @@ -1,26 +0,0 @@ -package bwapi4.Text.Size; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public enum Enum { - - Small(0), - Default(1), - Large(2); - - private int value; - - public int getValue(){ - return value; - } - - Enum(int value){ - this.value = value; - } - -} diff --git a/generated/bwapi4/TilePosition.java b/generated/bwapi4/TilePosition.java deleted file mode 100644 index ef82a7c..0000000 --- a/generated/bwapi4/TilePosition.java +++ /dev/null @@ -1,85 +0,0 @@ -package bwapi4; - -import java.lang.Override; -import java.util.HashMap; -import java.util.Map; - -/** - * Build Tiles - each build tile is a 4x4 square of walk tiles, or a 32x32 square of pixels. - * These are called build tiles because buildability data is available at this resolution, and correspond to the tiles seen in game. - * For example, a Command Center occupies an area of 4x3 build tiles. - */ -public class TilePosition extends AbstractPoint{ - private int x, y; - - public TilePosition(int x, int y) { - this.x = x; - this.y = y; - } - - public String toString() { - return "[" + x + ", " + y + "]"; - } - - public native boolean isValid(); - - public native TilePosition makeValid(); - - public native double getLength(); - - public int getX() { - return x; - } - - public int getY() { - return y; - } - - public static TilePosition Invalid; - - public static TilePosition None; - - public static TilePosition Unknown; - - private static Map instances = new HashMap(); - - private TilePosition(long pointer) { - this.pointer = pointer; - } - - private static TilePosition get(long pointer) { - TilePosition instance = instances.get(pointer); - if (instance == null) { - instance = new TilePosition(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof TilePosition)) return false; - - TilePosition that = (TilePosition) o; - - if (x != that.x) return false; - if (y != that.y) return false; - - return true; - } - - @Override - public int hashCode() { - int result = x; - result = 31 * result + y; - return result; - } - - public TilePosition getPoint(){ - return this; - } -} \ No newline at end of file diff --git a/generated/bwapi4/Tournament/ActionID.java b/generated/bwapi4/Tournament/ActionID.java deleted file mode 100644 index a6a1c2c..0000000 --- a/generated/bwapi4/Tournament/ActionID.java +++ /dev/null @@ -1,35 +0,0 @@ -package bwapi4.Tournament; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public enum ActionID { - - EnableFlag(0), - PauseGame(1), - ResumeGame(2), - LeaveGame(3), - SetLocalSpeed(4), - SetTextSize(5), - SetLatCom(6), - SetGUI(7), - SetMap(8), - SetFrameSkip(9), - Printf(10), - SendText(11); - - private int value; - - public int getValue(){ - return value; - } - - ActionID(int value){ - this.value = value; - } - -} diff --git a/generated/bwapi4/UnaryFilter.java b/generated/bwapi4/UnaryFilter.java deleted file mode 100644 index d3848f6..0000000 --- a/generated/bwapi4/UnaryFilter.java +++ /dev/null @@ -1,34 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class UnaryFilter { - - - private static Map instances = new HashMap(); - - private UnaryFilter(long pointer) { - this.pointer = pointer; - } - - private static UnaryFilter get(long pointer) { - if (pointer == 0 ) { - return null; - } - UnaryFilter instance = instances.get(pointer); - if (instance == null ) { - instance = new UnaryFilter(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - -} diff --git a/generated/bwapi4/Unit.java b/generated/bwapi4/Unit.java deleted file mode 100644 index 3cb2e35..0000000 --- a/generated/bwapi4/Unit.java +++ /dev/null @@ -1,2760 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; -import bwapi4.PositionedObject; - -public class Unit extends PositionedObject -{ - - public int getID() { - return getID_native(pointer); - } - - public boolean exists() { - return exists_native(pointer); - } - - public int getReplayID() { - return getReplayID_native(pointer); - } - - public Player getPlayer() { - return getPlayer_native(pointer); - } - - public UnitType getType() { - return getType_native(pointer); - } - - public Position getPosition() { - return getPosition_native(pointer); - } - - public TilePosition getTilePosition() { - return getTilePosition_native(pointer); - } - - public double getAngle() { - return getAngle_native(pointer); - } - - public double getVelocityX() { - return getVelocityX_native(pointer); - } - - public double getVelocityY() { - return getVelocityY_native(pointer); - } - - public Region getRegion() { - return getRegion_native(pointer); - } - - public int getLeft() { - return getLeft_native(pointer); - } - - public int getTop() { - return getTop_native(pointer); - } - - public int getRight() { - return getRight_native(pointer); - } - - public int getBottom() { - return getBottom_native(pointer); - } - - public int getHitPoints() { - return getHitPoints_native(pointer); - } - - public int getShields() { - return getShields_native(pointer); - } - - public int getEnergy() { - return getEnergy_native(pointer); - } - - public int getResources() { - return getResources_native(pointer); - } - - public int getResourceGroup() { - return getResourceGroup_native(pointer); - } - - public int getDistance(PositionOrUnit target) { - return getDistance_native(pointer, target); - } - - public boolean hasPath(PositionOrUnit target) { - return hasPath_native(pointer, target); - } - - public int getLastCommandFrame() { - return getLastCommandFrame_native(pointer); - } - - public UnitCommand getLastCommand() { - return getLastCommand_native(pointer); - } - - public Player getLastAttackingPlayer() { - return getLastAttackingPlayer_native(pointer); - } - - public UnitType getInitialType() { - return getInitialType_native(pointer); - } - - public Position getInitialPosition() { - return getInitialPosition_native(pointer); - } - - public TilePosition getInitialTilePosition() { - return getInitialTilePosition_native(pointer); - } - - public int getInitialHitPoints() { - return getInitialHitPoints_native(pointer); - } - - public int getInitialResources() { - return getInitialResources_native(pointer); - } - - public int getKillCount() { - return getKillCount_native(pointer); - } - - public int getAcidSporeCount() { - return getAcidSporeCount_native(pointer); - } - - public int getInterceptorCount() { - return getInterceptorCount_native(pointer); - } - - public int getScarabCount() { - return getScarabCount_native(pointer); - } - - public int getSpiderMineCount() { - return getSpiderMineCount_native(pointer); - } - - public int getGroundWeaponCooldown() { - return getGroundWeaponCooldown_native(pointer); - } - - public int getAirWeaponCooldown() { - return getAirWeaponCooldown_native(pointer); - } - - public int getSpellCooldown() { - return getSpellCooldown_native(pointer); - } - - public int getDefenseMatrixPoints() { - return getDefenseMatrixPoints_native(pointer); - } - - public int getDefenseMatrixTimer() { - return getDefenseMatrixTimer_native(pointer); - } - - public int getEnsnareTimer() { - return getEnsnareTimer_native(pointer); - } - - public int getIrradiateTimer() { - return getIrradiateTimer_native(pointer); - } - - public int getLockdownTimer() { - return getLockdownTimer_native(pointer); - } - - public int getMaelstromTimer() { - return getMaelstromTimer_native(pointer); - } - - public int getOrderTimer() { - return getOrderTimer_native(pointer); - } - - public int getPlagueTimer() { - return getPlagueTimer_native(pointer); - } - - public int getRemoveTimer() { - return getRemoveTimer_native(pointer); - } - - public int getStasisTimer() { - return getStasisTimer_native(pointer); - } - - public int getStimTimer() { - return getStimTimer_native(pointer); - } - - public UnitType getBuildType() { - return getBuildType_native(pointer); - } - - public TechType getTech() { - return getTech_native(pointer); - } - - public UpgradeType getUpgrade() { - return getUpgrade_native(pointer); - } - - public int getRemainingBuildTime() { - return getRemainingBuildTime_native(pointer); - } - - public int getRemainingTrainTime() { - return getRemainingTrainTime_native(pointer); - } - - public int getRemainingResearchTime() { - return getRemainingResearchTime_native(pointer); - } - - public int getRemainingUpgradeTime() { - return getRemainingUpgradeTime_native(pointer); - } - - public Unit getBuildUnit() { - return getBuildUnit_native(pointer); - } - - public Unit getTarget() { - return getTarget_native(pointer); - } - - public Position getTargetPosition() { - return getTargetPosition_native(pointer); - } - - public Order getOrder() { - return getOrder_native(pointer); - } - - public Order getSecondaryOrder() { - return getSecondaryOrder_native(pointer); - } - - public Unit getOrderTarget() { - return getOrderTarget_native(pointer); - } - - public Position getOrderTargetPosition() { - return getOrderTargetPosition_native(pointer); - } - - public Position getRallyPosition() { - return getRallyPosition_native(pointer); - } - - public Unit getRallyUnit() { - return getRallyUnit_native(pointer); - } - - public Unit getAddon() { - return getAddon_native(pointer); - } - - public Unit getNydusExit() { - return getNydusExit_native(pointer); - } - - public Unit getPowerUp() { - return getPowerUp_native(pointer); - } - - public Unit getTransport() { - return getTransport_native(pointer); - } - - public List getLoadedUnits() { - return getLoadedUnits_native(pointer); - } - - public int getSpaceRemaining() { - return getSpaceRemaining_native(pointer); - } - - public Unit getCarrier() { - return getCarrier_native(pointer); - } - - public List getInterceptors() { - return getInterceptors_native(pointer); - } - - public Unit getHatchery() { - return getHatchery_native(pointer); - } - - public List getLarva() { - return getLarva_native(pointer); - } - - public boolean hasNuke() { - return hasNuke_native(pointer); - } - - public boolean isAccelerating() { - return isAccelerating_native(pointer); - } - - public boolean isAttacking() { - return isAttacking_native(pointer); - } - - public boolean isAttackFrame() { - return isAttackFrame_native(pointer); - } - - public boolean isBeingConstructed() { - return isBeingConstructed_native(pointer); - } - - public boolean isBeingGathered() { - return isBeingGathered_native(pointer); - } - - public boolean isBeingHealed() { - return isBeingHealed_native(pointer); - } - - public boolean isBlind() { - return isBlind_native(pointer); - } - - public boolean isBraking() { - return isBraking_native(pointer); - } - - public boolean isBurrowed() { - return isBurrowed_native(pointer); - } - - public boolean isCarryingGas() { - return isCarryingGas_native(pointer); - } - - public boolean isCarryingMinerals() { - return isCarryingMinerals_native(pointer); - } - - public boolean isCloaked() { - return isCloaked_native(pointer); - } - - public boolean isCompleted() { - return isCompleted_native(pointer); - } - - public boolean isConstructing() { - return isConstructing_native(pointer); - } - - public boolean isDefenseMatrixed() { - return isDefenseMatrixed_native(pointer); - } - - public boolean isDetected() { - return isDetected_native(pointer); - } - - public boolean isEnsnared() { - return isEnsnared_native(pointer); - } - - public boolean isFlying() { - return isFlying_native(pointer); - } - - public boolean isFollowing() { - return isFollowing_native(pointer); - } - - public boolean isGatheringGas() { - return isGatheringGas_native(pointer); - } - - public boolean isGatheringMinerals() { - return isGatheringMinerals_native(pointer); - } - - public boolean isHallucination() { - return isHallucination_native(pointer); - } - - public boolean isHoldingPosition() { - return isHoldingPosition_native(pointer); - } - - public boolean isIdle() { - return isIdle_native(pointer); - } - - public boolean isInterruptible() { - return isInterruptible_native(pointer); - } - - public boolean isInvincible() { - return isInvincible_native(pointer); - } - - public boolean isInWeaponRange(Unit target) { - return isInWeaponRange_native(pointer, target); - } - - public boolean isIrradiated() { - return isIrradiated_native(pointer); - } - - public boolean isLifted() { - return isLifted_native(pointer); - } - - public boolean isLoaded() { - return isLoaded_native(pointer); - } - - public boolean isLockedDown() { - return isLockedDown_native(pointer); - } - - public boolean isMaelstrommed() { - return isMaelstrommed_native(pointer); - } - - public boolean isMorphing() { - return isMorphing_native(pointer); - } - - public boolean isMoving() { - return isMoving_native(pointer); - } - - public boolean isParasited() { - return isParasited_native(pointer); - } - - public boolean isPatrolling() { - return isPatrolling_native(pointer); - } - - public boolean isPlagued() { - return isPlagued_native(pointer); - } - - public boolean isRepairing() { - return isRepairing_native(pointer); - } - - public boolean isResearching() { - return isResearching_native(pointer); - } - - public boolean isSelected() { - return isSelected_native(pointer); - } - - public boolean isSieged() { - return isSieged_native(pointer); - } - - public boolean isStartingAttack() { - return isStartingAttack_native(pointer); - } - - public boolean isStasised() { - return isStasised_native(pointer); - } - - public boolean isStimmed() { - return isStimmed_native(pointer); - } - - public boolean isStuck() { - return isStuck_native(pointer); - } - - public boolean isTraining() { - return isTraining_native(pointer); - } - - public boolean isUnderAttack() { - return isUnderAttack_native(pointer); - } - - public boolean isUnderDarkSwarm() { - return isUnderDarkSwarm_native(pointer); - } - - public boolean isUnderDisruptionWeb() { - return isUnderDisruptionWeb_native(pointer); - } - - public boolean isUnderStorm() { - return isUnderStorm_native(pointer); - } - - public boolean isPowered() { - return isPowered_native(pointer); - } - - public boolean isUpgrading() { - return isUpgrading_native(pointer); - } - - public boolean isVisible() { - return isVisible_native(pointer); - } - - public boolean isVisible(Player player) { - return isVisible_native(pointer, player); - } - - public boolean isTargetable() { - return isTargetable_native(pointer); - } - - public boolean issueCommand(UnitCommand command) { - return issueCommand_native(pointer, command); - } - - public boolean attack(PositionOrUnit target) { - return attack_native(pointer, target); - } - - public boolean attack(PositionOrUnit target, boolean shiftQueueCommand) { - return attack_native(pointer, target, shiftQueueCommand); - } - - public boolean build(UnitType type) { - return build_native(pointer, type); - } - - public boolean build(UnitType type, TilePosition target) { - return build_native(pointer, type, target); - } - - public boolean buildAddon(UnitType type) { - return buildAddon_native(pointer, type); - } - - public boolean train() { - return train_native(pointer); - } - - public boolean train(UnitType type) { - return train_native(pointer, type); - } - - public boolean morph(UnitType type) { - return morph_native(pointer, type); - } - - public boolean research(TechType tech) { - return research_native(pointer, tech); - } - - public boolean upgrade(UpgradeType upgrade) { - return upgrade_native(pointer, upgrade); - } - - public boolean setRallyPoint(PositionOrUnit target) { - return setRallyPoint_native(pointer, target); - } - - public boolean move(Position target) { - return move_native(pointer, target); - } - - public boolean move(Position target, boolean shiftQueueCommand) { - return move_native(pointer, target, shiftQueueCommand); - } - - public boolean patrol(Position target) { - return patrol_native(pointer, target); - } - - public boolean patrol(Position target, boolean shiftQueueCommand) { - return patrol_native(pointer, target, shiftQueueCommand); - } - - public boolean holdPosition() { - return holdPosition_native(pointer); - } - - public boolean holdPosition(boolean shiftQueueCommand) { - return holdPosition_native(pointer, shiftQueueCommand); - } - - public boolean stop() { - return stop_native(pointer); - } - - public boolean stop(boolean shiftQueueCommand) { - return stop_native(pointer, shiftQueueCommand); - } - - public boolean follow(Unit target) { - return follow_native(pointer, target); - } - - public boolean follow(Unit target, boolean shiftQueueCommand) { - return follow_native(pointer, target, shiftQueueCommand); - } - - public boolean gather(Unit target) { - return gather_native(pointer, target); - } - - public boolean gather(Unit target, boolean shiftQueueCommand) { - return gather_native(pointer, target, shiftQueueCommand); - } - - public boolean returnCargo() { - return returnCargo_native(pointer); - } - - public boolean returnCargo(boolean shiftQueueCommand) { - return returnCargo_native(pointer, shiftQueueCommand); - } - - public boolean repair(Unit target) { - return repair_native(pointer, target); - } - - public boolean repair(Unit target, boolean shiftQueueCommand) { - return repair_native(pointer, target, shiftQueueCommand); - } - - public boolean burrow() { - return burrow_native(pointer); - } - - public boolean unburrow() { - return unburrow_native(pointer); - } - - public boolean cloak() { - return cloak_native(pointer); - } - - public boolean decloak() { - return decloak_native(pointer); - } - - public boolean siege() { - return siege_native(pointer); - } - - public boolean unsiege() { - return unsiege_native(pointer); - } - - public boolean lift() { - return lift_native(pointer); - } - - public boolean land(TilePosition target) { - return land_native(pointer, target); - } - - public boolean load(Unit target) { - return load_native(pointer, target); - } - - public boolean load(Unit target, boolean shiftQueueCommand) { - return load_native(pointer, target, shiftQueueCommand); - } - - public boolean unload(Unit target) { - return unload_native(pointer, target); - } - - public boolean unloadAll() { - return unloadAll_native(pointer); - } - - public boolean unloadAll(boolean shiftQueueCommand) { - return unloadAll_native(pointer, shiftQueueCommand); - } - - public boolean unloadAll(Position target) { - return unloadAll_native(pointer, target); - } - - public boolean unloadAll(Position target, boolean shiftQueueCommand) { - return unloadAll_native(pointer, target, shiftQueueCommand); - } - - public boolean rightClick(PositionOrUnit target) { - return rightClick_native(pointer, target); - } - - public boolean rightClick(PositionOrUnit target, boolean shiftQueueCommand) { - return rightClick_native(pointer, target, shiftQueueCommand); - } - - public boolean haltConstruction() { - return haltConstruction_native(pointer); - } - - public boolean cancelConstruction() { - return cancelConstruction_native(pointer); - } - - public boolean cancelAddon() { - return cancelAddon_native(pointer); - } - - public boolean cancelTrain() { - return cancelTrain_native(pointer); - } - - public boolean cancelTrain(int slot) { - return cancelTrain_native(pointer, slot); - } - - public boolean cancelMorph() { - return cancelMorph_native(pointer); - } - - public boolean cancelResearch() { - return cancelResearch_native(pointer); - } - - public boolean cancelUpgrade() { - return cancelUpgrade_native(pointer); - } - - public boolean useTech(TechType tech) { - return useTech_native(pointer, tech); - } - - public boolean useTech(TechType tech, PositionOrUnit target) { - return useTech_native(pointer, tech, target); - } - - public boolean placeCOP(TilePosition target) { - return placeCOP_native(pointer, target); - } - - public boolean canIssueCommand(UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanBuildUnitType, boolean checkCanTargetUnit, boolean checkCanIssueCommandType) { - return canIssueCommand_native(pointer, command, checkCanUseTechPositionOnPositions, checkCanUseTechUnitOnUnits, checkCanBuildUnitType, checkCanTargetUnit, checkCanIssueCommandType); - } - - public boolean canIssueCommand(UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanBuildUnitType, boolean checkCanTargetUnit) { - return canIssueCommand_native(pointer, command, checkCanUseTechPositionOnPositions, checkCanUseTechUnitOnUnits, checkCanBuildUnitType, checkCanTargetUnit); - } - - public boolean canIssueCommand(UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanBuildUnitType) { - return canIssueCommand_native(pointer, command, checkCanUseTechPositionOnPositions, checkCanUseTechUnitOnUnits, checkCanBuildUnitType); - } - - public boolean canIssueCommand(UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits) { - return canIssueCommand_native(pointer, command, checkCanUseTechPositionOnPositions, checkCanUseTechUnitOnUnits); - } - - public boolean canIssueCommand(UnitCommand command, boolean checkCanUseTechPositionOnPositions) { - return canIssueCommand_native(pointer, command, checkCanUseTechPositionOnPositions); - } - - public boolean canIssueCommand(UnitCommand command) { - return canIssueCommand_native(pointer, command); - } - - public boolean canIssueCommand(UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanBuildUnitType, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canIssueCommand_native(pointer, command, checkCanUseTechPositionOnPositions, checkCanUseTechUnitOnUnits, checkCanBuildUnitType, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canIssueCommandGrouped(UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped) { - return canIssueCommandGrouped_native(pointer, command, checkCanUseTechPositionOnPositions, checkCanUseTechUnitOnUnits, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibilityGrouped); - } - - public boolean canIssueCommandGrouped(UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanTargetUnit, boolean checkCanIssueCommandType) { - return canIssueCommandGrouped_native(pointer, command, checkCanUseTechPositionOnPositions, checkCanUseTechUnitOnUnits, checkCanTargetUnit, checkCanIssueCommandType); - } - - public boolean canIssueCommandGrouped(UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanTargetUnit) { - return canIssueCommandGrouped_native(pointer, command, checkCanUseTechPositionOnPositions, checkCanUseTechUnitOnUnits, checkCanTargetUnit); - } - - public boolean canIssueCommandGrouped(UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits) { - return canIssueCommandGrouped_native(pointer, command, checkCanUseTechPositionOnPositions, checkCanUseTechUnitOnUnits); - } - - public boolean canIssueCommandGrouped(UnitCommand command, boolean checkCanUseTechPositionOnPositions) { - return canIssueCommandGrouped_native(pointer, command, checkCanUseTechPositionOnPositions); - } - - public boolean canIssueCommandGrouped(UnitCommand command) { - return canIssueCommandGrouped_native(pointer, command); - } - - public boolean canIssueCommandGrouped(UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped, boolean checkCommandibility) { - return canIssueCommandGrouped_native(pointer, command, checkCanUseTechPositionOnPositions, checkCanUseTechUnitOnUnits, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibilityGrouped, checkCommandibility); - } - - public boolean canCommand() { - return canCommand_native(pointer); - } - - public boolean canCommandGrouped() { - return canCommandGrouped_native(pointer); - } - - public boolean canCommandGrouped(boolean checkCommandibility) { - return canCommandGrouped_native(pointer, checkCommandibility); - } - - public boolean canIssueCommandType(UnitCommandType ct) { - return canIssueCommandType_native(pointer, ct); - } - - public boolean canIssueCommandType(UnitCommandType ct, boolean checkCommandibility) { - return canIssueCommandType_native(pointer, ct, checkCommandibility); - } - - public boolean canIssueCommandTypeGrouped(UnitCommandType ct, boolean checkCommandibilityGrouped) { - return canIssueCommandTypeGrouped_native(pointer, ct, checkCommandibilityGrouped); - } - - public boolean canIssueCommandTypeGrouped(UnitCommandType ct) { - return canIssueCommandTypeGrouped_native(pointer, ct); - } - - public boolean canIssueCommandTypeGrouped(UnitCommandType ct, boolean checkCommandibilityGrouped, boolean checkCommandibility) { - return canIssueCommandTypeGrouped_native(pointer, ct, checkCommandibilityGrouped, checkCommandibility); - } - - public boolean canTargetUnit(Unit targetUnit) { - return canTargetUnit_native(pointer, targetUnit); - } - - public boolean canTargetUnit(Unit targetUnit, boolean checkCommandibility) { - return canTargetUnit_native(pointer, targetUnit, checkCommandibility); - } - - public boolean canAttack() { - return canAttack_native(pointer); - } - - public boolean canAttack(boolean checkCommandibility) { - return canAttack_native(pointer, checkCommandibility); - } - - public boolean canAttack(PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType) { - return canAttack_native(pointer, target, checkCanTargetUnit, checkCanIssueCommandType); - } - - public boolean canAttack(PositionOrUnit target, boolean checkCanTargetUnit) { - return canAttack_native(pointer, target, checkCanTargetUnit); - } - - public boolean canAttack(PositionOrUnit target) { - return canAttack_native(pointer, target); - } - - public boolean canAttack(PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canAttack_native(pointer, target, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canAttackGrouped(boolean checkCommandibilityGrouped) { - return canAttackGrouped_native(pointer, checkCommandibilityGrouped); - } - - public boolean canAttackGrouped() { - return canAttackGrouped_native(pointer); - } - - public boolean canAttackGrouped(boolean checkCommandibilityGrouped, boolean checkCommandibility) { - return canAttackGrouped_native(pointer, checkCommandibilityGrouped, checkCommandibility); - } - - public boolean canAttackGrouped(PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped) { - return canAttackGrouped_native(pointer, target, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibilityGrouped); - } - - public boolean canAttackGrouped(PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType) { - return canAttackGrouped_native(pointer, target, checkCanTargetUnit, checkCanIssueCommandType); - } - - public boolean canAttackGrouped(PositionOrUnit target, boolean checkCanTargetUnit) { - return canAttackGrouped_native(pointer, target, checkCanTargetUnit); - } - - public boolean canAttackGrouped(PositionOrUnit target) { - return canAttackGrouped_native(pointer, target); - } - - public boolean canAttackGrouped(PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped, boolean checkCommandibility) { - return canAttackGrouped_native(pointer, target, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibilityGrouped, checkCommandibility); - } - - public boolean canAttackMove() { - return canAttackMove_native(pointer); - } - - public boolean canAttackMove(boolean checkCommandibility) { - return canAttackMove_native(pointer, checkCommandibility); - } - - public boolean canAttackMoveGrouped(boolean checkCommandibilityGrouped) { - return canAttackMoveGrouped_native(pointer, checkCommandibilityGrouped); - } - - public boolean canAttackMoveGrouped() { - return canAttackMoveGrouped_native(pointer); - } - - public boolean canAttackMoveGrouped(boolean checkCommandibilityGrouped, boolean checkCommandibility) { - return canAttackMoveGrouped_native(pointer, checkCommandibilityGrouped, checkCommandibility); - } - - public boolean canAttackUnit() { - return canAttackUnit_native(pointer); - } - - public boolean canAttackUnit(boolean checkCommandibility) { - return canAttackUnit_native(pointer, checkCommandibility); - } - - public boolean canAttackUnit(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType) { - return canAttackUnit_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType); - } - - public boolean canAttackUnit(Unit targetUnit, boolean checkCanTargetUnit) { - return canAttackUnit_native(pointer, targetUnit, checkCanTargetUnit); - } - - public boolean canAttackUnit(Unit targetUnit) { - return canAttackUnit_native(pointer, targetUnit); - } - - public boolean canAttackUnit(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canAttackUnit_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canAttackUnitGrouped(boolean checkCommandibilityGrouped) { - return canAttackUnitGrouped_native(pointer, checkCommandibilityGrouped); - } - - public boolean canAttackUnitGrouped() { - return canAttackUnitGrouped_native(pointer); - } - - public boolean canAttackUnitGrouped(boolean checkCommandibilityGrouped, boolean checkCommandibility) { - return canAttackUnitGrouped_native(pointer, checkCommandibilityGrouped, checkCommandibility); - } - - public boolean canAttackUnitGrouped(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped) { - return canAttackUnitGrouped_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibilityGrouped); - } - - public boolean canAttackUnitGrouped(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType) { - return canAttackUnitGrouped_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType); - } - - public boolean canAttackUnitGrouped(Unit targetUnit, boolean checkCanTargetUnit) { - return canAttackUnitGrouped_native(pointer, targetUnit, checkCanTargetUnit); - } - - public boolean canAttackUnitGrouped(Unit targetUnit) { - return canAttackUnitGrouped_native(pointer, targetUnit); - } - - public boolean canAttackUnitGrouped(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped, boolean checkCommandibility) { - return canAttackUnitGrouped_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibilityGrouped, checkCommandibility); - } - - public boolean canBuild() { - return canBuild_native(pointer); - } - - public boolean canBuild(boolean checkCommandibility) { - return canBuild_native(pointer, checkCommandibility); - } - - public boolean canBuild(UnitType uType, boolean checkCanIssueCommandType) { - return canBuild_native(pointer, uType, checkCanIssueCommandType); - } - - public boolean canBuild(UnitType uType) { - return canBuild_native(pointer, uType); - } - - public boolean canBuild(UnitType uType, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canBuild_native(pointer, uType, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canBuild(UnitType uType, TilePosition tilePos, boolean checkTargetUnitType, boolean checkCanIssueCommandType) { - return canBuild_native(pointer, uType, tilePos, checkTargetUnitType, checkCanIssueCommandType); - } - - public boolean canBuild(UnitType uType, TilePosition tilePos, boolean checkTargetUnitType) { - return canBuild_native(pointer, uType, tilePos, checkTargetUnitType); - } - - public boolean canBuild(UnitType uType, TilePosition tilePos) { - return canBuild_native(pointer, uType, tilePos); - } - - public boolean canBuild(UnitType uType, TilePosition tilePos, boolean checkTargetUnitType, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canBuild_native(pointer, uType, tilePos, checkTargetUnitType, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canBuildAddon() { - return canBuildAddon_native(pointer); - } - - public boolean canBuildAddon(boolean checkCommandibility) { - return canBuildAddon_native(pointer, checkCommandibility); - } - - public boolean canBuildAddon(UnitType uType, boolean checkCanIssueCommandType) { - return canBuildAddon_native(pointer, uType, checkCanIssueCommandType); - } - - public boolean canBuildAddon(UnitType uType) { - return canBuildAddon_native(pointer, uType); - } - - public boolean canBuildAddon(UnitType uType, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canBuildAddon_native(pointer, uType, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canTrain() { - return canTrain_native(pointer); - } - - public boolean canTrain(boolean checkCommandibility) { - return canTrain_native(pointer, checkCommandibility); - } - - public boolean canTrain(UnitType uType, boolean checkCanIssueCommandType) { - return canTrain_native(pointer, uType, checkCanIssueCommandType); - } - - public boolean canTrain(UnitType uType) { - return canTrain_native(pointer, uType); - } - - public boolean canTrain(UnitType uType, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canTrain_native(pointer, uType, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canMorph() { - return canMorph_native(pointer); - } - - public boolean canMorph(boolean checkCommandibility) { - return canMorph_native(pointer, checkCommandibility); - } - - public boolean canMorph(UnitType uType, boolean checkCanIssueCommandType) { - return canMorph_native(pointer, uType, checkCanIssueCommandType); - } - - public boolean canMorph(UnitType uType) { - return canMorph_native(pointer, uType); - } - - public boolean canMorph(UnitType uType, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canMorph_native(pointer, uType, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canResearch() { - return canResearch_native(pointer); - } - - public boolean canResearch(boolean checkCommandibility) { - return canResearch_native(pointer, checkCommandibility); - } - - public boolean canResearch(TechType type) { - return canResearch_native(pointer, type); - } - - public boolean canResearch(TechType type, boolean checkCanIssueCommandType) { - return canResearch_native(pointer, type, checkCanIssueCommandType); - } - - public boolean canUpgrade() { - return canUpgrade_native(pointer); - } - - public boolean canUpgrade(boolean checkCommandibility) { - return canUpgrade_native(pointer, checkCommandibility); - } - - public boolean canUpgrade(UpgradeType type) { - return canUpgrade_native(pointer, type); - } - - public boolean canUpgrade(UpgradeType type, boolean checkCanIssueCommandType) { - return canUpgrade_native(pointer, type, checkCanIssueCommandType); - } - - public boolean canSetRallyPoint() { - return canSetRallyPoint_native(pointer); - } - - public boolean canSetRallyPoint(boolean checkCommandibility) { - return canSetRallyPoint_native(pointer, checkCommandibility); - } - - public boolean canSetRallyPoint(PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType) { - return canSetRallyPoint_native(pointer, target, checkCanTargetUnit, checkCanIssueCommandType); - } - - public boolean canSetRallyPoint(PositionOrUnit target, boolean checkCanTargetUnit) { - return canSetRallyPoint_native(pointer, target, checkCanTargetUnit); - } - - public boolean canSetRallyPoint(PositionOrUnit target) { - return canSetRallyPoint_native(pointer, target); - } - - public boolean canSetRallyPoint(PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canSetRallyPoint_native(pointer, target, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canSetRallyPosition() { - return canSetRallyPosition_native(pointer); - } - - public boolean canSetRallyPosition(boolean checkCommandibility) { - return canSetRallyPosition_native(pointer, checkCommandibility); - } - - public boolean canSetRallyUnit() { - return canSetRallyUnit_native(pointer); - } - - public boolean canSetRallyUnit(boolean checkCommandibility) { - return canSetRallyUnit_native(pointer, checkCommandibility); - } - - public boolean canSetRallyUnit(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType) { - return canSetRallyUnit_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType); - } - - public boolean canSetRallyUnit(Unit targetUnit, boolean checkCanTargetUnit) { - return canSetRallyUnit_native(pointer, targetUnit, checkCanTargetUnit); - } - - public boolean canSetRallyUnit(Unit targetUnit) { - return canSetRallyUnit_native(pointer, targetUnit); - } - - public boolean canSetRallyUnit(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canSetRallyUnit_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canMove() { - return canMove_native(pointer); - } - - public boolean canMove(boolean checkCommandibility) { - return canMove_native(pointer, checkCommandibility); - } - - public boolean canMoveGrouped(boolean checkCommandibilityGrouped) { - return canMoveGrouped_native(pointer, checkCommandibilityGrouped); - } - - public boolean canMoveGrouped() { - return canMoveGrouped_native(pointer); - } - - public boolean canMoveGrouped(boolean checkCommandibilityGrouped, boolean checkCommandibility) { - return canMoveGrouped_native(pointer, checkCommandibilityGrouped, checkCommandibility); - } - - public boolean canPatrol() { - return canPatrol_native(pointer); - } - - public boolean canPatrol(boolean checkCommandibility) { - return canPatrol_native(pointer, checkCommandibility); - } - - public boolean canPatrolGrouped(boolean checkCommandibilityGrouped) { - return canPatrolGrouped_native(pointer, checkCommandibilityGrouped); - } - - public boolean canPatrolGrouped() { - return canPatrolGrouped_native(pointer); - } - - public boolean canPatrolGrouped(boolean checkCommandibilityGrouped, boolean checkCommandibility) { - return canPatrolGrouped_native(pointer, checkCommandibilityGrouped, checkCommandibility); - } - - public boolean canFollow() { - return canFollow_native(pointer); - } - - public boolean canFollow(boolean checkCommandibility) { - return canFollow_native(pointer, checkCommandibility); - } - - public boolean canFollow(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType) { - return canFollow_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType); - } - - public boolean canFollow(Unit targetUnit, boolean checkCanTargetUnit) { - return canFollow_native(pointer, targetUnit, checkCanTargetUnit); - } - - public boolean canFollow(Unit targetUnit) { - return canFollow_native(pointer, targetUnit); - } - - public boolean canFollow(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canFollow_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canGather() { - return canGather_native(pointer); - } - - public boolean canGather(boolean checkCommandibility) { - return canGather_native(pointer, checkCommandibility); - } - - public boolean canGather(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType) { - return canGather_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType); - } - - public boolean canGather(Unit targetUnit, boolean checkCanTargetUnit) { - return canGather_native(pointer, targetUnit, checkCanTargetUnit); - } - - public boolean canGather(Unit targetUnit) { - return canGather_native(pointer, targetUnit); - } - - public boolean canGather(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canGather_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canReturnCargo() { - return canReturnCargo_native(pointer); - } - - public boolean canReturnCargo(boolean checkCommandibility) { - return canReturnCargo_native(pointer, checkCommandibility); - } - - public boolean canHoldPosition() { - return canHoldPosition_native(pointer); - } - - public boolean canHoldPosition(boolean checkCommandibility) { - return canHoldPosition_native(pointer, checkCommandibility); - } - - public boolean canStop() { - return canStop_native(pointer); - } - - public boolean canStop(boolean checkCommandibility) { - return canStop_native(pointer, checkCommandibility); - } - - public boolean canRepair() { - return canRepair_native(pointer); - } - - public boolean canRepair(boolean checkCommandibility) { - return canRepair_native(pointer, checkCommandibility); - } - - public boolean canRepair(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType) { - return canRepair_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType); - } - - public boolean canRepair(Unit targetUnit, boolean checkCanTargetUnit) { - return canRepair_native(pointer, targetUnit, checkCanTargetUnit); - } - - public boolean canRepair(Unit targetUnit) { - return canRepair_native(pointer, targetUnit); - } - - public boolean canRepair(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canRepair_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canBurrow() { - return canBurrow_native(pointer); - } - - public boolean canBurrow(boolean checkCommandibility) { - return canBurrow_native(pointer, checkCommandibility); - } - - public boolean canUnburrow() { - return canUnburrow_native(pointer); - } - - public boolean canUnburrow(boolean checkCommandibility) { - return canUnburrow_native(pointer, checkCommandibility); - } - - public boolean canCloak() { - return canCloak_native(pointer); - } - - public boolean canCloak(boolean checkCommandibility) { - return canCloak_native(pointer, checkCommandibility); - } - - public boolean canDecloak() { - return canDecloak_native(pointer); - } - - public boolean canDecloak(boolean checkCommandibility) { - return canDecloak_native(pointer, checkCommandibility); - } - - public boolean canSiege() { - return canSiege_native(pointer); - } - - public boolean canSiege(boolean checkCommandibility) { - return canSiege_native(pointer, checkCommandibility); - } - - public boolean canUnsiege() { - return canUnsiege_native(pointer); - } - - public boolean canUnsiege(boolean checkCommandibility) { - return canUnsiege_native(pointer, checkCommandibility); - } - - public boolean canLift() { - return canLift_native(pointer); - } - - public boolean canLift(boolean checkCommandibility) { - return canLift_native(pointer, checkCommandibility); - } - - public boolean canLand() { - return canLand_native(pointer); - } - - public boolean canLand(boolean checkCommandibility) { - return canLand_native(pointer, checkCommandibility); - } - - public boolean canLand(TilePosition target, boolean checkCanIssueCommandType) { - return canLand_native(pointer, target, checkCanIssueCommandType); - } - - public boolean canLand(TilePosition target) { - return canLand_native(pointer, target); - } - - public boolean canLand(TilePosition target, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canLand_native(pointer, target, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canLoad() { - return canLoad_native(pointer); - } - - public boolean canLoad(boolean checkCommandibility) { - return canLoad_native(pointer, checkCommandibility); - } - - public boolean canLoad(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType) { - return canLoad_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType); - } - - public boolean canLoad(Unit targetUnit, boolean checkCanTargetUnit) { - return canLoad_native(pointer, targetUnit, checkCanTargetUnit); - } - - public boolean canLoad(Unit targetUnit) { - return canLoad_native(pointer, targetUnit); - } - - public boolean canLoad(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canLoad_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canUnloadWithOrWithoutTarget() { - return canUnloadWithOrWithoutTarget_native(pointer); - } - - public boolean canUnloadWithOrWithoutTarget(boolean checkCommandibility) { - return canUnloadWithOrWithoutTarget_native(pointer, checkCommandibility); - } - - public boolean canUnloadAtPosition(Position targDropPos, boolean checkCanIssueCommandType) { - return canUnloadAtPosition_native(pointer, targDropPos, checkCanIssueCommandType); - } - - public boolean canUnloadAtPosition(Position targDropPos) { - return canUnloadAtPosition_native(pointer, targDropPos); - } - - public boolean canUnloadAtPosition(Position targDropPos, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canUnloadAtPosition_native(pointer, targDropPos, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canUnload() { - return canUnload_native(pointer); - } - - public boolean canUnload(boolean checkCommandibility) { - return canUnload_native(pointer, checkCommandibility); - } - - public boolean canUnload(Unit targetUnit, boolean checkCanTargetUnit, boolean checkPosition, boolean checkCanIssueCommandType) { - return canUnload_native(pointer, targetUnit, checkCanTargetUnit, checkPosition, checkCanIssueCommandType); - } - - public boolean canUnload(Unit targetUnit, boolean checkCanTargetUnit, boolean checkPosition) { - return canUnload_native(pointer, targetUnit, checkCanTargetUnit, checkPosition); - } - - public boolean canUnload(Unit targetUnit, boolean checkCanTargetUnit) { - return canUnload_native(pointer, targetUnit, checkCanTargetUnit); - } - - public boolean canUnload(Unit targetUnit) { - return canUnload_native(pointer, targetUnit); - } - - public boolean canUnload(Unit targetUnit, boolean checkCanTargetUnit, boolean checkPosition, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canUnload_native(pointer, targetUnit, checkCanTargetUnit, checkPosition, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canUnloadAll() { - return canUnloadAll_native(pointer); - } - - public boolean canUnloadAll(boolean checkCommandibility) { - return canUnloadAll_native(pointer, checkCommandibility); - } - - public boolean canUnloadAllPosition() { - return canUnloadAllPosition_native(pointer); - } - - public boolean canUnloadAllPosition(boolean checkCommandibility) { - return canUnloadAllPosition_native(pointer, checkCommandibility); - } - - public boolean canUnloadAllPosition(Position targDropPos, boolean checkCanIssueCommandType) { - return canUnloadAllPosition_native(pointer, targDropPos, checkCanIssueCommandType); - } - - public boolean canUnloadAllPosition(Position targDropPos) { - return canUnloadAllPosition_native(pointer, targDropPos); - } - - public boolean canUnloadAllPosition(Position targDropPos, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canUnloadAllPosition_native(pointer, targDropPos, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canRightClick() { - return canRightClick_native(pointer); - } - - public boolean canRightClick(boolean checkCommandibility) { - return canRightClick_native(pointer, checkCommandibility); - } - - public boolean canRightClick(PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType) { - return canRightClick_native(pointer, target, checkCanTargetUnit, checkCanIssueCommandType); - } - - public boolean canRightClick(PositionOrUnit target, boolean checkCanTargetUnit) { - return canRightClick_native(pointer, target, checkCanTargetUnit); - } - - public boolean canRightClick(PositionOrUnit target) { - return canRightClick_native(pointer, target); - } - - public boolean canRightClick(PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canRightClick_native(pointer, target, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canRightClickGrouped(boolean checkCommandibilityGrouped) { - return canRightClickGrouped_native(pointer, checkCommandibilityGrouped); - } - - public boolean canRightClickGrouped() { - return canRightClickGrouped_native(pointer); - } - - public boolean canRightClickGrouped(boolean checkCommandibilityGrouped, boolean checkCommandibility) { - return canRightClickGrouped_native(pointer, checkCommandibilityGrouped, checkCommandibility); - } - - public boolean canRightClickGrouped(PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped) { - return canRightClickGrouped_native(pointer, target, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibilityGrouped); - } - - public boolean canRightClickGrouped(PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType) { - return canRightClickGrouped_native(pointer, target, checkCanTargetUnit, checkCanIssueCommandType); - } - - public boolean canRightClickGrouped(PositionOrUnit target, boolean checkCanTargetUnit) { - return canRightClickGrouped_native(pointer, target, checkCanTargetUnit); - } - - public boolean canRightClickGrouped(PositionOrUnit target) { - return canRightClickGrouped_native(pointer, target); - } - - public boolean canRightClickGrouped(PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped, boolean checkCommandibility) { - return canRightClickGrouped_native(pointer, target, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibilityGrouped, checkCommandibility); - } - - public boolean canRightClickPosition() { - return canRightClickPosition_native(pointer); - } - - public boolean canRightClickPosition(boolean checkCommandibility) { - return canRightClickPosition_native(pointer, checkCommandibility); - } - - public boolean canRightClickPositionGrouped(boolean checkCommandibilityGrouped) { - return canRightClickPositionGrouped_native(pointer, checkCommandibilityGrouped); - } - - public boolean canRightClickPositionGrouped() { - return canRightClickPositionGrouped_native(pointer); - } - - public boolean canRightClickPositionGrouped(boolean checkCommandibilityGrouped, boolean checkCommandibility) { - return canRightClickPositionGrouped_native(pointer, checkCommandibilityGrouped, checkCommandibility); - } - - public boolean canRightClickUnit() { - return canRightClickUnit_native(pointer); - } - - public boolean canRightClickUnit(boolean checkCommandibility) { - return canRightClickUnit_native(pointer, checkCommandibility); - } - - public boolean canRightClickUnit(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType) { - return canRightClickUnit_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType); - } - - public boolean canRightClickUnit(Unit targetUnit, boolean checkCanTargetUnit) { - return canRightClickUnit_native(pointer, targetUnit, checkCanTargetUnit); - } - - public boolean canRightClickUnit(Unit targetUnit) { - return canRightClickUnit_native(pointer, targetUnit); - } - - public boolean canRightClickUnit(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canRightClickUnit_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canRightClickUnitGrouped(boolean checkCommandibilityGrouped) { - return canRightClickUnitGrouped_native(pointer, checkCommandibilityGrouped); - } - - public boolean canRightClickUnitGrouped() { - return canRightClickUnitGrouped_native(pointer); - } - - public boolean canRightClickUnitGrouped(boolean checkCommandibilityGrouped, boolean checkCommandibility) { - return canRightClickUnitGrouped_native(pointer, checkCommandibilityGrouped, checkCommandibility); - } - - public boolean canRightClickUnitGrouped(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped) { - return canRightClickUnitGrouped_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibilityGrouped); - } - - public boolean canRightClickUnitGrouped(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType) { - return canRightClickUnitGrouped_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType); - } - - public boolean canRightClickUnitGrouped(Unit targetUnit, boolean checkCanTargetUnit) { - return canRightClickUnitGrouped_native(pointer, targetUnit, checkCanTargetUnit); - } - - public boolean canRightClickUnitGrouped(Unit targetUnit) { - return canRightClickUnitGrouped_native(pointer, targetUnit); - } - - public boolean canRightClickUnitGrouped(Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped, boolean checkCommandibility) { - return canRightClickUnitGrouped_native(pointer, targetUnit, checkCanTargetUnit, checkCanIssueCommandType, checkCommandibilityGrouped, checkCommandibility); - } - - public boolean canHaltConstruction() { - return canHaltConstruction_native(pointer); - } - - public boolean canHaltConstruction(boolean checkCommandibility) { - return canHaltConstruction_native(pointer, checkCommandibility); - } - - public boolean canCancelConstruction() { - return canCancelConstruction_native(pointer); - } - - public boolean canCancelConstruction(boolean checkCommandibility) { - return canCancelConstruction_native(pointer, checkCommandibility); - } - - public boolean canCancelAddon() { - return canCancelAddon_native(pointer); - } - - public boolean canCancelAddon(boolean checkCommandibility) { - return canCancelAddon_native(pointer, checkCommandibility); - } - - public boolean canCancelTrain() { - return canCancelTrain_native(pointer); - } - - public boolean canCancelTrain(boolean checkCommandibility) { - return canCancelTrain_native(pointer, checkCommandibility); - } - - public boolean canCancelTrainSlot() { - return canCancelTrainSlot_native(pointer); - } - - public boolean canCancelTrainSlot(boolean checkCommandibility) { - return canCancelTrainSlot_native(pointer, checkCommandibility); - } - - public boolean canCancelTrainSlot(int slot, boolean checkCanIssueCommandType) { - return canCancelTrainSlot_native(pointer, slot, checkCanIssueCommandType); - } - - public boolean canCancelTrainSlot(int slot) { - return canCancelTrainSlot_native(pointer, slot); - } - - public boolean canCancelTrainSlot(int slot, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canCancelTrainSlot_native(pointer, slot, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canCancelMorph() { - return canCancelMorph_native(pointer); - } - - public boolean canCancelMorph(boolean checkCommandibility) { - return canCancelMorph_native(pointer, checkCommandibility); - } - - public boolean canCancelResearch() { - return canCancelResearch_native(pointer); - } - - public boolean canCancelResearch(boolean checkCommandibility) { - return canCancelResearch_native(pointer, checkCommandibility); - } - - public boolean canCancelUpgrade() { - return canCancelUpgrade_native(pointer); - } - - public boolean canCancelUpgrade(boolean checkCommandibility) { - return canCancelUpgrade_native(pointer, checkCommandibility); - } - - public boolean canUseTechWithOrWithoutTarget() { - return canUseTechWithOrWithoutTarget_native(pointer); - } - - public boolean canUseTechWithOrWithoutTarget(boolean checkCommandibility) { - return canUseTechWithOrWithoutTarget_native(pointer, checkCommandibility); - } - - public boolean canUseTechWithOrWithoutTarget(TechType tech, boolean checkCanIssueCommandType) { - return canUseTechWithOrWithoutTarget_native(pointer, tech, checkCanIssueCommandType); - } - - public boolean canUseTechWithOrWithoutTarget(TechType tech) { - return canUseTechWithOrWithoutTarget_native(pointer, tech); - } - - public boolean canUseTechWithOrWithoutTarget(TechType tech, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canUseTechWithOrWithoutTarget_native(pointer, tech, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canUseTech(TechType tech, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkTargetsType, boolean checkCanIssueCommandType) { - return canUseTech_native(pointer, tech, target, checkCanTargetUnit, checkTargetsType, checkCanIssueCommandType); - } - - public boolean canUseTech(TechType tech, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkTargetsType) { - return canUseTech_native(pointer, tech, target, checkCanTargetUnit, checkTargetsType); - } - - public boolean canUseTech(TechType tech, PositionOrUnit target, boolean checkCanTargetUnit) { - return canUseTech_native(pointer, tech, target, checkCanTargetUnit); - } - - public boolean canUseTech(TechType tech, PositionOrUnit target) { - return canUseTech_native(pointer, tech, target); - } - - public boolean canUseTech(TechType tech) { - return canUseTech_native(pointer, tech); - } - - public boolean canUseTech(TechType tech, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkTargetsType, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canUseTech_native(pointer, tech, target, checkCanTargetUnit, checkTargetsType, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canUseTechWithoutTarget(TechType tech, boolean checkCanIssueCommandType) { - return canUseTechWithoutTarget_native(pointer, tech, checkCanIssueCommandType); - } - - public boolean canUseTechWithoutTarget(TechType tech) { - return canUseTechWithoutTarget_native(pointer, tech); - } - - public boolean canUseTechWithoutTarget(TechType tech, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canUseTechWithoutTarget_native(pointer, tech, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canUseTechUnit(TechType tech, boolean checkCanIssueCommandType) { - return canUseTechUnit_native(pointer, tech, checkCanIssueCommandType); - } - - public boolean canUseTechUnit(TechType tech) { - return canUseTechUnit_native(pointer, tech); - } - - public boolean canUseTechUnit(TechType tech, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canUseTechUnit_native(pointer, tech, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canUseTechUnit(TechType tech, Unit targetUnit, boolean checkCanTargetUnit, boolean checkTargetsUnits, boolean checkCanIssueCommandType) { - return canUseTechUnit_native(pointer, tech, targetUnit, checkCanTargetUnit, checkTargetsUnits, checkCanIssueCommandType); - } - - public boolean canUseTechUnit(TechType tech, Unit targetUnit, boolean checkCanTargetUnit, boolean checkTargetsUnits) { - return canUseTechUnit_native(pointer, tech, targetUnit, checkCanTargetUnit, checkTargetsUnits); - } - - public boolean canUseTechUnit(TechType tech, Unit targetUnit, boolean checkCanTargetUnit) { - return canUseTechUnit_native(pointer, tech, targetUnit, checkCanTargetUnit); - } - - public boolean canUseTechUnit(TechType tech, Unit targetUnit) { - return canUseTechUnit_native(pointer, tech, targetUnit); - } - - public boolean canUseTechUnit(TechType tech, Unit targetUnit, boolean checkCanTargetUnit, boolean checkTargetsUnits, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canUseTechUnit_native(pointer, tech, targetUnit, checkCanTargetUnit, checkTargetsUnits, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canUseTechPosition(TechType tech, boolean checkCanIssueCommandType) { - return canUseTechPosition_native(pointer, tech, checkCanIssueCommandType); - } - - public boolean canUseTechPosition(TechType tech) { - return canUseTechPosition_native(pointer, tech); - } - - public boolean canUseTechPosition(TechType tech, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canUseTechPosition_native(pointer, tech, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canUseTechPosition(TechType tech, Position target, boolean checkTargetsPositions, boolean checkCanIssueCommandType) { - return canUseTechPosition_native(pointer, tech, target, checkTargetsPositions, checkCanIssueCommandType); - } - - public boolean canUseTechPosition(TechType tech, Position target, boolean checkTargetsPositions) { - return canUseTechPosition_native(pointer, tech, target, checkTargetsPositions); - } - - public boolean canUseTechPosition(TechType tech, Position target) { - return canUseTechPosition_native(pointer, tech, target); - } - - public boolean canUseTechPosition(TechType tech, Position target, boolean checkTargetsPositions, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canUseTechPosition_native(pointer, tech, target, checkTargetsPositions, checkCanIssueCommandType, checkCommandibility); - } - - public boolean canPlaceCOP() { - return canPlaceCOP_native(pointer); - } - - public boolean canPlaceCOP(boolean checkCommandibility) { - return canPlaceCOP_native(pointer, checkCommandibility); - } - - public boolean canPlaceCOP(TilePosition target, boolean checkCanIssueCommandType) { - return canPlaceCOP_native(pointer, target, checkCanIssueCommandType); - } - - public boolean canPlaceCOP(TilePosition target) { - return canPlaceCOP_native(pointer, target); - } - - public boolean canPlaceCOP(TilePosition target, boolean checkCanIssueCommandType, boolean checkCommandibility) { - return canPlaceCOP_native(pointer, target, checkCanIssueCommandType, checkCommandibility); - } - - - private static Map instances = new HashMap(); - - private Unit(long pointer) { - this.pointer = pointer; - } - - private static Unit get(long pointer) { - if (pointer == 0 ) { - return null; - } - Unit instance = instances.get(pointer); - if (instance == null ) { - instance = new Unit(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native int getID_native(long pointer); - - private native boolean exists_native(long pointer); - - private native int getReplayID_native(long pointer); - - private native Player getPlayer_native(long pointer); - - private native UnitType getType_native(long pointer); - - private native Position getPosition_native(long pointer); - - private native TilePosition getTilePosition_native(long pointer); - - private native double getAngle_native(long pointer); - - private native double getVelocityX_native(long pointer); - - private native double getVelocityY_native(long pointer); - - private native Region getRegion_native(long pointer); - - private native int getLeft_native(long pointer); - - private native int getTop_native(long pointer); - - private native int getRight_native(long pointer); - - private native int getBottom_native(long pointer); - - private native int getHitPoints_native(long pointer); - - private native int getShields_native(long pointer); - - private native int getEnergy_native(long pointer); - - private native int getResources_native(long pointer); - - private native int getResourceGroup_native(long pointer); - - private native int getDistance_native(long pointer, PositionOrUnit target); - - private native boolean hasPath_native(long pointer, PositionOrUnit target); - - private native int getLastCommandFrame_native(long pointer); - - private native UnitCommand getLastCommand_native(long pointer); - - private native Player getLastAttackingPlayer_native(long pointer); - - private native UnitType getInitialType_native(long pointer); - - private native Position getInitialPosition_native(long pointer); - - private native TilePosition getInitialTilePosition_native(long pointer); - - private native int getInitialHitPoints_native(long pointer); - - private native int getInitialResources_native(long pointer); - - private native int getKillCount_native(long pointer); - - private native int getAcidSporeCount_native(long pointer); - - private native int getInterceptorCount_native(long pointer); - - private native int getScarabCount_native(long pointer); - - private native int getSpiderMineCount_native(long pointer); - - private native int getGroundWeaponCooldown_native(long pointer); - - private native int getAirWeaponCooldown_native(long pointer); - - private native int getSpellCooldown_native(long pointer); - - private native int getDefenseMatrixPoints_native(long pointer); - - private native int getDefenseMatrixTimer_native(long pointer); - - private native int getEnsnareTimer_native(long pointer); - - private native int getIrradiateTimer_native(long pointer); - - private native int getLockdownTimer_native(long pointer); - - private native int getMaelstromTimer_native(long pointer); - - private native int getOrderTimer_native(long pointer); - - private native int getPlagueTimer_native(long pointer); - - private native int getRemoveTimer_native(long pointer); - - private native int getStasisTimer_native(long pointer); - - private native int getStimTimer_native(long pointer); - - private native UnitType getBuildType_native(long pointer); - - private native TechType getTech_native(long pointer); - - private native UpgradeType getUpgrade_native(long pointer); - - private native int getRemainingBuildTime_native(long pointer); - - private native int getRemainingTrainTime_native(long pointer); - - private native int getRemainingResearchTime_native(long pointer); - - private native int getRemainingUpgradeTime_native(long pointer); - - private native Unit getBuildUnit_native(long pointer); - - private native Unit getTarget_native(long pointer); - - private native Position getTargetPosition_native(long pointer); - - private native Order getOrder_native(long pointer); - - private native Order getSecondaryOrder_native(long pointer); - - private native Unit getOrderTarget_native(long pointer); - - private native Position getOrderTargetPosition_native(long pointer); - - private native Position getRallyPosition_native(long pointer); - - private native Unit getRallyUnit_native(long pointer); - - private native Unit getAddon_native(long pointer); - - private native Unit getNydusExit_native(long pointer); - - private native Unit getPowerUp_native(long pointer); - - private native Unit getTransport_native(long pointer); - - private native List getLoadedUnits_native(long pointer); - - private native int getSpaceRemaining_native(long pointer); - - private native Unit getCarrier_native(long pointer); - - private native List getInterceptors_native(long pointer); - - private native Unit getHatchery_native(long pointer); - - private native List getLarva_native(long pointer); - - private native boolean hasNuke_native(long pointer); - - private native boolean isAccelerating_native(long pointer); - - private native boolean isAttacking_native(long pointer); - - private native boolean isAttackFrame_native(long pointer); - - private native boolean isBeingConstructed_native(long pointer); - - private native boolean isBeingGathered_native(long pointer); - - private native boolean isBeingHealed_native(long pointer); - - private native boolean isBlind_native(long pointer); - - private native boolean isBraking_native(long pointer); - - private native boolean isBurrowed_native(long pointer); - - private native boolean isCarryingGas_native(long pointer); - - private native boolean isCarryingMinerals_native(long pointer); - - private native boolean isCloaked_native(long pointer); - - private native boolean isCompleted_native(long pointer); - - private native boolean isConstructing_native(long pointer); - - private native boolean isDefenseMatrixed_native(long pointer); - - private native boolean isDetected_native(long pointer); - - private native boolean isEnsnared_native(long pointer); - - private native boolean isFlying_native(long pointer); - - private native boolean isFollowing_native(long pointer); - - private native boolean isGatheringGas_native(long pointer); - - private native boolean isGatheringMinerals_native(long pointer); - - private native boolean isHallucination_native(long pointer); - - private native boolean isHoldingPosition_native(long pointer); - - private native boolean isIdle_native(long pointer); - - private native boolean isInterruptible_native(long pointer); - - private native boolean isInvincible_native(long pointer); - - private native boolean isInWeaponRange_native(long pointer, Unit target); - - private native boolean isIrradiated_native(long pointer); - - private native boolean isLifted_native(long pointer); - - private native boolean isLoaded_native(long pointer); - - private native boolean isLockedDown_native(long pointer); - - private native boolean isMaelstrommed_native(long pointer); - - private native boolean isMorphing_native(long pointer); - - private native boolean isMoving_native(long pointer); - - private native boolean isParasited_native(long pointer); - - private native boolean isPatrolling_native(long pointer); - - private native boolean isPlagued_native(long pointer); - - private native boolean isRepairing_native(long pointer); - - private native boolean isResearching_native(long pointer); - - private native boolean isSelected_native(long pointer); - - private native boolean isSieged_native(long pointer); - - private native boolean isStartingAttack_native(long pointer); - - private native boolean isStasised_native(long pointer); - - private native boolean isStimmed_native(long pointer); - - private native boolean isStuck_native(long pointer); - - private native boolean isTraining_native(long pointer); - - private native boolean isUnderAttack_native(long pointer); - - private native boolean isUnderDarkSwarm_native(long pointer); - - private native boolean isUnderDisruptionWeb_native(long pointer); - - private native boolean isUnderStorm_native(long pointer); - - private native boolean isPowered_native(long pointer); - - private native boolean isUpgrading_native(long pointer); - - private native boolean isVisible_native(long pointer); - - private native boolean isVisible_native(long pointer, Player player); - - private native boolean isTargetable_native(long pointer); - - private native boolean issueCommand_native(long pointer, UnitCommand command); - - private native boolean attack_native(long pointer, PositionOrUnit target); - - private native boolean attack_native(long pointer, PositionOrUnit target, boolean shiftQueueCommand); - - private native boolean build_native(long pointer, UnitType type); - - private native boolean build_native(long pointer, UnitType type, TilePosition target); - - private native boolean buildAddon_native(long pointer, UnitType type); - - private native boolean train_native(long pointer); - - private native boolean train_native(long pointer, UnitType type); - - private native boolean morph_native(long pointer, UnitType type); - - private native boolean research_native(long pointer, TechType tech); - - private native boolean upgrade_native(long pointer, UpgradeType upgrade); - - private native boolean setRallyPoint_native(long pointer, PositionOrUnit target); - - private native boolean move_native(long pointer, Position target); - - private native boolean move_native(long pointer, Position target, boolean shiftQueueCommand); - - private native boolean patrol_native(long pointer, Position target); - - private native boolean patrol_native(long pointer, Position target, boolean shiftQueueCommand); - - private native boolean holdPosition_native(long pointer); - - private native boolean holdPosition_native(long pointer, boolean shiftQueueCommand); - - private native boolean stop_native(long pointer); - - private native boolean stop_native(long pointer, boolean shiftQueueCommand); - - private native boolean follow_native(long pointer, Unit target); - - private native boolean follow_native(long pointer, Unit target, boolean shiftQueueCommand); - - private native boolean gather_native(long pointer, Unit target); - - private native boolean gather_native(long pointer, Unit target, boolean shiftQueueCommand); - - private native boolean returnCargo_native(long pointer); - - private native boolean returnCargo_native(long pointer, boolean shiftQueueCommand); - - private native boolean repair_native(long pointer, Unit target); - - private native boolean repair_native(long pointer, Unit target, boolean shiftQueueCommand); - - private native boolean burrow_native(long pointer); - - private native boolean unburrow_native(long pointer); - - private native boolean cloak_native(long pointer); - - private native boolean decloak_native(long pointer); - - private native boolean siege_native(long pointer); - - private native boolean unsiege_native(long pointer); - - private native boolean lift_native(long pointer); - - private native boolean land_native(long pointer, TilePosition target); - - private native boolean load_native(long pointer, Unit target); - - private native boolean load_native(long pointer, Unit target, boolean shiftQueueCommand); - - private native boolean unload_native(long pointer, Unit target); - - private native boolean unloadAll_native(long pointer); - - private native boolean unloadAll_native(long pointer, boolean shiftQueueCommand); - - private native boolean unloadAll_native(long pointer, Position target); - - private native boolean unloadAll_native(long pointer, Position target, boolean shiftQueueCommand); - - private native boolean rightClick_native(long pointer, PositionOrUnit target); - - private native boolean rightClick_native(long pointer, PositionOrUnit target, boolean shiftQueueCommand); - - private native boolean haltConstruction_native(long pointer); - - private native boolean cancelConstruction_native(long pointer); - - private native boolean cancelAddon_native(long pointer); - - private native boolean cancelTrain_native(long pointer); - - private native boolean cancelTrain_native(long pointer, int slot); - - private native boolean cancelMorph_native(long pointer); - - private native boolean cancelResearch_native(long pointer); - - private native boolean cancelUpgrade_native(long pointer); - - private native boolean useTech_native(long pointer, TechType tech); - - private native boolean useTech_native(long pointer, TechType tech, PositionOrUnit target); - - private native boolean placeCOP_native(long pointer, TilePosition target); - - private native boolean canIssueCommand_native(long pointer, UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanBuildUnitType, boolean checkCanTargetUnit, boolean checkCanIssueCommandType); - - private native boolean canIssueCommand_native(long pointer, UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanBuildUnitType, boolean checkCanTargetUnit); - - private native boolean canIssueCommand_native(long pointer, UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanBuildUnitType); - - private native boolean canIssueCommand_native(long pointer, UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits); - - private native boolean canIssueCommand_native(long pointer, UnitCommand command, boolean checkCanUseTechPositionOnPositions); - - private native boolean canIssueCommand_native(long pointer, UnitCommand command); - - private native boolean canIssueCommand_native(long pointer, UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanBuildUnitType, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canIssueCommandGrouped_native(long pointer, UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped); - - private native boolean canIssueCommandGrouped_native(long pointer, UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanTargetUnit, boolean checkCanIssueCommandType); - - private native boolean canIssueCommandGrouped_native(long pointer, UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanTargetUnit); - - private native boolean canIssueCommandGrouped_native(long pointer, UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits); - - private native boolean canIssueCommandGrouped_native(long pointer, UnitCommand command, boolean checkCanUseTechPositionOnPositions); - - private native boolean canIssueCommandGrouped_native(long pointer, UnitCommand command); - - private native boolean canIssueCommandGrouped_native(long pointer, UnitCommand command, boolean checkCanUseTechPositionOnPositions, boolean checkCanUseTechUnitOnUnits, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped, boolean checkCommandibility); - - private native boolean canCommand_native(long pointer); - - private native boolean canCommandGrouped_native(long pointer); - - private native boolean canCommandGrouped_native(long pointer, boolean checkCommandibility); - - private native boolean canIssueCommandType_native(long pointer, UnitCommandType ct); - - private native boolean canIssueCommandType_native(long pointer, UnitCommandType ct, boolean checkCommandibility); - - private native boolean canIssueCommandTypeGrouped_native(long pointer, UnitCommandType ct, boolean checkCommandibilityGrouped); - - private native boolean canIssueCommandTypeGrouped_native(long pointer, UnitCommandType ct); - - private native boolean canIssueCommandTypeGrouped_native(long pointer, UnitCommandType ct, boolean checkCommandibilityGrouped, boolean checkCommandibility); - - private native boolean canTargetUnit_native(long pointer, Unit targetUnit); - - private native boolean canTargetUnit_native(long pointer, Unit targetUnit, boolean checkCommandibility); - - private native boolean canAttack_native(long pointer); - - private native boolean canAttack_native(long pointer, boolean checkCommandibility); - - private native boolean canAttack_native(long pointer, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType); - - private native boolean canAttack_native(long pointer, PositionOrUnit target, boolean checkCanTargetUnit); - - private native boolean canAttack_native(long pointer, PositionOrUnit target); - - private native boolean canAttack_native(long pointer, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canAttackGrouped_native(long pointer, boolean checkCommandibilityGrouped); - - private native boolean canAttackGrouped_native(long pointer); - - private native boolean canAttackGrouped_native(long pointer, boolean checkCommandibilityGrouped, boolean checkCommandibility); - - private native boolean canAttackGrouped_native(long pointer, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped); - - private native boolean canAttackGrouped_native(long pointer, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType); - - private native boolean canAttackGrouped_native(long pointer, PositionOrUnit target, boolean checkCanTargetUnit); - - private native boolean canAttackGrouped_native(long pointer, PositionOrUnit target); - - private native boolean canAttackGrouped_native(long pointer, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped, boolean checkCommandibility); - - private native boolean canAttackMove_native(long pointer); - - private native boolean canAttackMove_native(long pointer, boolean checkCommandibility); - - private native boolean canAttackMoveGrouped_native(long pointer, boolean checkCommandibilityGrouped); - - private native boolean canAttackMoveGrouped_native(long pointer); - - private native boolean canAttackMoveGrouped_native(long pointer, boolean checkCommandibilityGrouped, boolean checkCommandibility); - - private native boolean canAttackUnit_native(long pointer); - - private native boolean canAttackUnit_native(long pointer, boolean checkCommandibility); - - private native boolean canAttackUnit_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType); - - private native boolean canAttackUnit_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit); - - private native boolean canAttackUnit_native(long pointer, Unit targetUnit); - - private native boolean canAttackUnit_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canAttackUnitGrouped_native(long pointer, boolean checkCommandibilityGrouped); - - private native boolean canAttackUnitGrouped_native(long pointer); - - private native boolean canAttackUnitGrouped_native(long pointer, boolean checkCommandibilityGrouped, boolean checkCommandibility); - - private native boolean canAttackUnitGrouped_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped); - - private native boolean canAttackUnitGrouped_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType); - - private native boolean canAttackUnitGrouped_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit); - - private native boolean canAttackUnitGrouped_native(long pointer, Unit targetUnit); - - private native boolean canAttackUnitGrouped_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped, boolean checkCommandibility); - - private native boolean canBuild_native(long pointer); - - private native boolean canBuild_native(long pointer, boolean checkCommandibility); - - private native boolean canBuild_native(long pointer, UnitType uType, boolean checkCanIssueCommandType); - - private native boolean canBuild_native(long pointer, UnitType uType); - - private native boolean canBuild_native(long pointer, UnitType uType, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canBuild_native(long pointer, UnitType uType, TilePosition tilePos, boolean checkTargetUnitType, boolean checkCanIssueCommandType); - - private native boolean canBuild_native(long pointer, UnitType uType, TilePosition tilePos, boolean checkTargetUnitType); - - private native boolean canBuild_native(long pointer, UnitType uType, TilePosition tilePos); - - private native boolean canBuild_native(long pointer, UnitType uType, TilePosition tilePos, boolean checkTargetUnitType, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canBuildAddon_native(long pointer); - - private native boolean canBuildAddon_native(long pointer, boolean checkCommandibility); - - private native boolean canBuildAddon_native(long pointer, UnitType uType, boolean checkCanIssueCommandType); - - private native boolean canBuildAddon_native(long pointer, UnitType uType); - - private native boolean canBuildAddon_native(long pointer, UnitType uType, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canTrain_native(long pointer); - - private native boolean canTrain_native(long pointer, boolean checkCommandibility); - - private native boolean canTrain_native(long pointer, UnitType uType, boolean checkCanIssueCommandType); - - private native boolean canTrain_native(long pointer, UnitType uType); - - private native boolean canTrain_native(long pointer, UnitType uType, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canMorph_native(long pointer); - - private native boolean canMorph_native(long pointer, boolean checkCommandibility); - - private native boolean canMorph_native(long pointer, UnitType uType, boolean checkCanIssueCommandType); - - private native boolean canMorph_native(long pointer, UnitType uType); - - private native boolean canMorph_native(long pointer, UnitType uType, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canResearch_native(long pointer); - - private native boolean canResearch_native(long pointer, boolean checkCommandibility); - - private native boolean canResearch_native(long pointer, TechType type); - - private native boolean canResearch_native(long pointer, TechType type, boolean checkCanIssueCommandType); - - private native boolean canUpgrade_native(long pointer); - - private native boolean canUpgrade_native(long pointer, boolean checkCommandibility); - - private native boolean canUpgrade_native(long pointer, UpgradeType type); - - private native boolean canUpgrade_native(long pointer, UpgradeType type, boolean checkCanIssueCommandType); - - private native boolean canSetRallyPoint_native(long pointer); - - private native boolean canSetRallyPoint_native(long pointer, boolean checkCommandibility); - - private native boolean canSetRallyPoint_native(long pointer, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType); - - private native boolean canSetRallyPoint_native(long pointer, PositionOrUnit target, boolean checkCanTargetUnit); - - private native boolean canSetRallyPoint_native(long pointer, PositionOrUnit target); - - private native boolean canSetRallyPoint_native(long pointer, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canSetRallyPosition_native(long pointer); - - private native boolean canSetRallyPosition_native(long pointer, boolean checkCommandibility); - - private native boolean canSetRallyUnit_native(long pointer); - - private native boolean canSetRallyUnit_native(long pointer, boolean checkCommandibility); - - private native boolean canSetRallyUnit_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType); - - private native boolean canSetRallyUnit_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit); - - private native boolean canSetRallyUnit_native(long pointer, Unit targetUnit); - - private native boolean canSetRallyUnit_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canMove_native(long pointer); - - private native boolean canMove_native(long pointer, boolean checkCommandibility); - - private native boolean canMoveGrouped_native(long pointer, boolean checkCommandibilityGrouped); - - private native boolean canMoveGrouped_native(long pointer); - - private native boolean canMoveGrouped_native(long pointer, boolean checkCommandibilityGrouped, boolean checkCommandibility); - - private native boolean canPatrol_native(long pointer); - - private native boolean canPatrol_native(long pointer, boolean checkCommandibility); - - private native boolean canPatrolGrouped_native(long pointer, boolean checkCommandibilityGrouped); - - private native boolean canPatrolGrouped_native(long pointer); - - private native boolean canPatrolGrouped_native(long pointer, boolean checkCommandibilityGrouped, boolean checkCommandibility); - - private native boolean canFollow_native(long pointer); - - private native boolean canFollow_native(long pointer, boolean checkCommandibility); - - private native boolean canFollow_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType); - - private native boolean canFollow_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit); - - private native boolean canFollow_native(long pointer, Unit targetUnit); - - private native boolean canFollow_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canGather_native(long pointer); - - private native boolean canGather_native(long pointer, boolean checkCommandibility); - - private native boolean canGather_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType); - - private native boolean canGather_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit); - - private native boolean canGather_native(long pointer, Unit targetUnit); - - private native boolean canGather_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canReturnCargo_native(long pointer); - - private native boolean canReturnCargo_native(long pointer, boolean checkCommandibility); - - private native boolean canHoldPosition_native(long pointer); - - private native boolean canHoldPosition_native(long pointer, boolean checkCommandibility); - - private native boolean canStop_native(long pointer); - - private native boolean canStop_native(long pointer, boolean checkCommandibility); - - private native boolean canRepair_native(long pointer); - - private native boolean canRepair_native(long pointer, boolean checkCommandibility); - - private native boolean canRepair_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType); - - private native boolean canRepair_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit); - - private native boolean canRepair_native(long pointer, Unit targetUnit); - - private native boolean canRepair_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canBurrow_native(long pointer); - - private native boolean canBurrow_native(long pointer, boolean checkCommandibility); - - private native boolean canUnburrow_native(long pointer); - - private native boolean canUnburrow_native(long pointer, boolean checkCommandibility); - - private native boolean canCloak_native(long pointer); - - private native boolean canCloak_native(long pointer, boolean checkCommandibility); - - private native boolean canDecloak_native(long pointer); - - private native boolean canDecloak_native(long pointer, boolean checkCommandibility); - - private native boolean canSiege_native(long pointer); - - private native boolean canSiege_native(long pointer, boolean checkCommandibility); - - private native boolean canUnsiege_native(long pointer); - - private native boolean canUnsiege_native(long pointer, boolean checkCommandibility); - - private native boolean canLift_native(long pointer); - - private native boolean canLift_native(long pointer, boolean checkCommandibility); - - private native boolean canLand_native(long pointer); - - private native boolean canLand_native(long pointer, boolean checkCommandibility); - - private native boolean canLand_native(long pointer, TilePosition target, boolean checkCanIssueCommandType); - - private native boolean canLand_native(long pointer, TilePosition target); - - private native boolean canLand_native(long pointer, TilePosition target, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canLoad_native(long pointer); - - private native boolean canLoad_native(long pointer, boolean checkCommandibility); - - private native boolean canLoad_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType); - - private native boolean canLoad_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit); - - private native boolean canLoad_native(long pointer, Unit targetUnit); - - private native boolean canLoad_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canUnloadWithOrWithoutTarget_native(long pointer); - - private native boolean canUnloadWithOrWithoutTarget_native(long pointer, boolean checkCommandibility); - - private native boolean canUnloadAtPosition_native(long pointer, Position targDropPos, boolean checkCanIssueCommandType); - - private native boolean canUnloadAtPosition_native(long pointer, Position targDropPos); - - private native boolean canUnloadAtPosition_native(long pointer, Position targDropPos, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canUnload_native(long pointer); - - private native boolean canUnload_native(long pointer, boolean checkCommandibility); - - private native boolean canUnload_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkPosition, boolean checkCanIssueCommandType); - - private native boolean canUnload_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkPosition); - - private native boolean canUnload_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit); - - private native boolean canUnload_native(long pointer, Unit targetUnit); - - private native boolean canUnload_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkPosition, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canUnloadAll_native(long pointer); - - private native boolean canUnloadAll_native(long pointer, boolean checkCommandibility); - - private native boolean canUnloadAllPosition_native(long pointer); - - private native boolean canUnloadAllPosition_native(long pointer, boolean checkCommandibility); - - private native boolean canUnloadAllPosition_native(long pointer, Position targDropPos, boolean checkCanIssueCommandType); - - private native boolean canUnloadAllPosition_native(long pointer, Position targDropPos); - - private native boolean canUnloadAllPosition_native(long pointer, Position targDropPos, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canRightClick_native(long pointer); - - private native boolean canRightClick_native(long pointer, boolean checkCommandibility); - - private native boolean canRightClick_native(long pointer, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType); - - private native boolean canRightClick_native(long pointer, PositionOrUnit target, boolean checkCanTargetUnit); - - private native boolean canRightClick_native(long pointer, PositionOrUnit target); - - private native boolean canRightClick_native(long pointer, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canRightClickGrouped_native(long pointer, boolean checkCommandibilityGrouped); - - private native boolean canRightClickGrouped_native(long pointer); - - private native boolean canRightClickGrouped_native(long pointer, boolean checkCommandibilityGrouped, boolean checkCommandibility); - - private native boolean canRightClickGrouped_native(long pointer, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped); - - private native boolean canRightClickGrouped_native(long pointer, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType); - - private native boolean canRightClickGrouped_native(long pointer, PositionOrUnit target, boolean checkCanTargetUnit); - - private native boolean canRightClickGrouped_native(long pointer, PositionOrUnit target); - - private native boolean canRightClickGrouped_native(long pointer, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped, boolean checkCommandibility); - - private native boolean canRightClickPosition_native(long pointer); - - private native boolean canRightClickPosition_native(long pointer, boolean checkCommandibility); - - private native boolean canRightClickPositionGrouped_native(long pointer, boolean checkCommandibilityGrouped); - - private native boolean canRightClickPositionGrouped_native(long pointer); - - private native boolean canRightClickPositionGrouped_native(long pointer, boolean checkCommandibilityGrouped, boolean checkCommandibility); - - private native boolean canRightClickUnit_native(long pointer); - - private native boolean canRightClickUnit_native(long pointer, boolean checkCommandibility); - - private native boolean canRightClickUnit_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType); - - private native boolean canRightClickUnit_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit); - - private native boolean canRightClickUnit_native(long pointer, Unit targetUnit); - - private native boolean canRightClickUnit_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canRightClickUnitGrouped_native(long pointer, boolean checkCommandibilityGrouped); - - private native boolean canRightClickUnitGrouped_native(long pointer); - - private native boolean canRightClickUnitGrouped_native(long pointer, boolean checkCommandibilityGrouped, boolean checkCommandibility); - - private native boolean canRightClickUnitGrouped_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped); - - private native boolean canRightClickUnitGrouped_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType); - - private native boolean canRightClickUnitGrouped_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit); - - private native boolean canRightClickUnitGrouped_native(long pointer, Unit targetUnit); - - private native boolean canRightClickUnitGrouped_native(long pointer, Unit targetUnit, boolean checkCanTargetUnit, boolean checkCanIssueCommandType, boolean checkCommandibilityGrouped, boolean checkCommandibility); - - private native boolean canHaltConstruction_native(long pointer); - - private native boolean canHaltConstruction_native(long pointer, boolean checkCommandibility); - - private native boolean canCancelConstruction_native(long pointer); - - private native boolean canCancelConstruction_native(long pointer, boolean checkCommandibility); - - private native boolean canCancelAddon_native(long pointer); - - private native boolean canCancelAddon_native(long pointer, boolean checkCommandibility); - - private native boolean canCancelTrain_native(long pointer); - - private native boolean canCancelTrain_native(long pointer, boolean checkCommandibility); - - private native boolean canCancelTrainSlot_native(long pointer); - - private native boolean canCancelTrainSlot_native(long pointer, boolean checkCommandibility); - - private native boolean canCancelTrainSlot_native(long pointer, int slot, boolean checkCanIssueCommandType); - - private native boolean canCancelTrainSlot_native(long pointer, int slot); - - private native boolean canCancelTrainSlot_native(long pointer, int slot, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canCancelMorph_native(long pointer); - - private native boolean canCancelMorph_native(long pointer, boolean checkCommandibility); - - private native boolean canCancelResearch_native(long pointer); - - private native boolean canCancelResearch_native(long pointer, boolean checkCommandibility); - - private native boolean canCancelUpgrade_native(long pointer); - - private native boolean canCancelUpgrade_native(long pointer, boolean checkCommandibility); - - private native boolean canUseTechWithOrWithoutTarget_native(long pointer); - - private native boolean canUseTechWithOrWithoutTarget_native(long pointer, boolean checkCommandibility); - - private native boolean canUseTechWithOrWithoutTarget_native(long pointer, TechType tech, boolean checkCanIssueCommandType); - - private native boolean canUseTechWithOrWithoutTarget_native(long pointer, TechType tech); - - private native boolean canUseTechWithOrWithoutTarget_native(long pointer, TechType tech, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canUseTech_native(long pointer, TechType tech, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkTargetsType, boolean checkCanIssueCommandType); - - private native boolean canUseTech_native(long pointer, TechType tech, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkTargetsType); - - private native boolean canUseTech_native(long pointer, TechType tech, PositionOrUnit target, boolean checkCanTargetUnit); - - private native boolean canUseTech_native(long pointer, TechType tech, PositionOrUnit target); - - private native boolean canUseTech_native(long pointer, TechType tech); - - private native boolean canUseTech_native(long pointer, TechType tech, PositionOrUnit target, boolean checkCanTargetUnit, boolean checkTargetsType, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canUseTechWithoutTarget_native(long pointer, TechType tech, boolean checkCanIssueCommandType); - - private native boolean canUseTechWithoutTarget_native(long pointer, TechType tech); - - private native boolean canUseTechWithoutTarget_native(long pointer, TechType tech, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canUseTechUnit_native(long pointer, TechType tech, boolean checkCanIssueCommandType); - - private native boolean canUseTechUnit_native(long pointer, TechType tech); - - private native boolean canUseTechUnit_native(long pointer, TechType tech, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canUseTechUnit_native(long pointer, TechType tech, Unit targetUnit, boolean checkCanTargetUnit, boolean checkTargetsUnits, boolean checkCanIssueCommandType); - - private native boolean canUseTechUnit_native(long pointer, TechType tech, Unit targetUnit, boolean checkCanTargetUnit, boolean checkTargetsUnits); - - private native boolean canUseTechUnit_native(long pointer, TechType tech, Unit targetUnit, boolean checkCanTargetUnit); - - private native boolean canUseTechUnit_native(long pointer, TechType tech, Unit targetUnit); - - private native boolean canUseTechUnit_native(long pointer, TechType tech, Unit targetUnit, boolean checkCanTargetUnit, boolean checkTargetsUnits, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canUseTechPosition_native(long pointer, TechType tech, boolean checkCanIssueCommandType); - - private native boolean canUseTechPosition_native(long pointer, TechType tech); - - private native boolean canUseTechPosition_native(long pointer, TechType tech, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canUseTechPosition_native(long pointer, TechType tech, Position target, boolean checkTargetsPositions, boolean checkCanIssueCommandType); - - private native boolean canUseTechPosition_native(long pointer, TechType tech, Position target, boolean checkTargetsPositions); - - private native boolean canUseTechPosition_native(long pointer, TechType tech, Position target); - - private native boolean canUseTechPosition_native(long pointer, TechType tech, Position target, boolean checkTargetsPositions, boolean checkCanIssueCommandType, boolean checkCommandibility); - - private native boolean canPlaceCOP_native(long pointer); - - private native boolean canPlaceCOP_native(long pointer, boolean checkCommandibility); - - private native boolean canPlaceCOP_native(long pointer, TilePosition target, boolean checkCanIssueCommandType); - - private native boolean canPlaceCOP_native(long pointer, TilePosition target); - - private native boolean canPlaceCOP_native(long pointer, TilePosition target, boolean checkCanIssueCommandType, boolean checkCommandibility); - - -} diff --git a/generated/bwapi4/UnitCommand.java b/generated/bwapi4/UnitCommand.java deleted file mode 100644 index 00b3d2f..0000000 --- a/generated/bwapi4/UnitCommand.java +++ /dev/null @@ -1,219 +0,0 @@ -package bwapi4; - - -public class UnitCommand { - - public static native UnitCommand attack(Unit unit, PositionOrUnit target); - - public static native UnitCommand attack(Unit unit, PositionOrUnit target, boolean shiftQueueCommand); - - public static native UnitCommand build(Unit unit, TilePosition target, UnitType type); - - public static native UnitCommand buildAddon(Unit unit, UnitType type); - - public static native UnitCommand train(Unit unit, UnitType type); - - public static native UnitCommand morph(Unit unit, UnitType type); - - public static native UnitCommand research(Unit unit, TechType tech); - - public static native UnitCommand upgrade(Unit unit, UpgradeType upgrade); - - public static native UnitCommand setRallyPoint(Unit unit, PositionOrUnit target); - - public static native UnitCommand move(Unit unit, Position target); - - public static native UnitCommand move(Unit unit, Position target, boolean shiftQueueCommand); - - public static native UnitCommand patrol(Unit unit, Position target); - - public static native UnitCommand patrol(Unit unit, Position target, boolean shiftQueueCommand); - - public static native UnitCommand holdPosition(Unit unit); - - public static native UnitCommand holdPosition(Unit unit, boolean shiftQueueCommand); - - public static native UnitCommand stop(Unit unit); - - public static native UnitCommand stop(Unit unit, boolean shiftQueueCommand); - - public static native UnitCommand follow(Unit unit, Unit target); - - public static native UnitCommand follow(Unit unit, Unit target, boolean shiftQueueCommand); - - public static native UnitCommand gather(Unit unit, Unit target); - - public static native UnitCommand gather(Unit unit, Unit target, boolean shiftQueueCommand); - - public static native UnitCommand returnCargo(Unit unit); - - public static native UnitCommand returnCargo(Unit unit, boolean shiftQueueCommand); - - public static native UnitCommand repair(Unit unit, Unit target); - - public static native UnitCommand repair(Unit unit, Unit target, boolean shiftQueueCommand); - - public static native UnitCommand burrow(Unit unit); - - public static native UnitCommand unburrow(Unit unit); - - public static native UnitCommand cloak(Unit unit); - - public static native UnitCommand decloak(Unit unit); - - public static native UnitCommand siege(Unit unit); - - public static native UnitCommand unsiege(Unit unit); - - public static native UnitCommand lift(Unit unit); - - public static native UnitCommand land(Unit unit, TilePosition target); - - public static native UnitCommand load(Unit unit, Unit target); - - public static native UnitCommand load(Unit unit, Unit target, boolean shiftQueueCommand); - - public static native UnitCommand unload(Unit unit, Unit target); - - public static native UnitCommand unloadAll(Unit unit); - - public static native UnitCommand unloadAll(Unit unit, boolean shiftQueueCommand); - - public static native UnitCommand unloadAll(Unit unit, Position target); - - public static native UnitCommand unloadAll(Unit unit, Position target, boolean shiftQueueCommand); - - public static native UnitCommand rightClick(Unit unit, PositionOrUnit target); - - public static native UnitCommand rightClick(Unit unit, PositionOrUnit target, boolean shiftQueueCommand); - - public static native UnitCommand haltConstruction(Unit unit); - - public static native UnitCommand cancelConstruction(Unit unit); - - public static native UnitCommand cancelAddon(Unit unit); - - public static native UnitCommand cancelTrain(Unit unit); - - public static native UnitCommand cancelTrain(Unit unit, int slot); - - public static native UnitCommand cancelMorph(Unit unit); - - public static native UnitCommand cancelResearch(Unit unit); - - public static native UnitCommand cancelUpgrade(Unit unit); - - public static native UnitCommand useTech(Unit unit, TechType tech); - - public static native UnitCommand useTech(Unit unit, TechType tech, PositionOrUnit target); - - public static native UnitCommand placeCOP(Unit unit, TilePosition target); - - private Unit unit; - - private UnitCommandType unitCommandType; - - private Unit target; - - private int x, y; - - private int extra; - - private UnitCommand(Unit unit, UnitCommandType unitCommandType, Unit target, int x, int y, int extra) { - this.unit = unit; - this.unitCommandType = unitCommandType; - this.target = target; - this.x = x; - this.y = y; - this.extra = extra; - } - - public Unit getUnit() { - return unit; - } - - public UnitCommandType getUnitCommandType() { - return unitCommandType; - } - - public Unit getTarget() { - return target; - } - - - - public int getSlot() { - if (unitCommandType == UnitCommandType.None) { - return extra; - } - return -1; - } - - public Position getTargetPosition() { - if (unitCommandType == UnitCommandType.Build || - unitCommandType == UnitCommandType.Land || - unitCommandType == UnitCommandType.Place_COP) { - return new Position(x * 32, y * 32); - } - return new Position(x, y); - } - - public TilePosition getTargetTilePosition() { - if (unitCommandType == UnitCommandType.Build || - unitCommandType == UnitCommandType.Land || - unitCommandType == UnitCommandType.Place_COP) { - return new TilePosition(x, y); - } - return new TilePosition(x / 32, y / 32); - } - - public boolean isQueued() { - if (unitCommandType == UnitCommandType.Attack_Move || - unitCommandType == UnitCommandType.Attack_Unit || - unitCommandType == UnitCommandType.Move || - unitCommandType == UnitCommandType.Patrol || - unitCommandType == UnitCommandType.Hold_Position || - unitCommandType == UnitCommandType.Stop || - unitCommandType == UnitCommandType.Follow || - unitCommandType == UnitCommandType.Gather || - unitCommandType == UnitCommandType.Return_Cargo || - unitCommandType == UnitCommandType.Repair || - unitCommandType == UnitCommandType.Load || - unitCommandType == UnitCommandType.Unload_All || - unitCommandType == UnitCommandType.Unload_All_Position || - unitCommandType == UnitCommandType.Right_Click_Position || - unitCommandType == UnitCommandType.Right_Click_Unit) { - return extra != 0; - } - return false; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof UnitCommand)) return false; - - UnitCommand that = (UnitCommand) o; - - if (extra != that.extra) return false; - if (x != that.x) return false; - if (y != that.y) return false; - if (target != null ? !target.equals(that.target) : that.target != null) return false; - if (unit != null ? !unit.equals(that.unit) : that.unit != null) return false; - if (unitCommandType != null ? !unitCommandType.equals(that.unitCommandType) : that.unitCommandType != null) - return false; - - return true; - } - - @Override - public int hashCode() { - int result = unit != null ? unit.hashCode() : 0; - result = 31 * result + (unitCommandType != null ? unitCommandType.hashCode() : 0); - result = 31 * result + (target != null ? target.hashCode() : 0); - result = 31 * result + x; - result = 31 * result + y; - result = 31 * result + extra; - return result; - } -} \ No newline at end of file diff --git a/generated/bwapi4/UnitCommandType.java b/generated/bwapi4/UnitCommandType.java deleted file mode 100644 index e407700..0000000 --- a/generated/bwapi4/UnitCommandType.java +++ /dev/null @@ -1,132 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class UnitCommandType { - - public String toString() { - return toString_native(pointer); - } - - public static UnitCommandType Attack_Move; - - public static UnitCommandType Attack_Unit; - - public static UnitCommandType Build; - - public static UnitCommandType Build_Addon; - - public static UnitCommandType Train; - - public static UnitCommandType Morph; - - public static UnitCommandType Research; - - public static UnitCommandType Upgrade; - - public static UnitCommandType Set_Rally_Position; - - public static UnitCommandType Set_Rally_Unit; - - public static UnitCommandType Move; - - public static UnitCommandType Patrol; - - public static UnitCommandType Hold_Position; - - public static UnitCommandType Stop; - - public static UnitCommandType Follow; - - public static UnitCommandType Gather; - - public static UnitCommandType Return_Cargo; - - public static UnitCommandType Repair; - - public static UnitCommandType Burrow; - - public static UnitCommandType Unburrow; - - public static UnitCommandType Cloak; - - public static UnitCommandType Decloak; - - public static UnitCommandType Siege; - - public static UnitCommandType Unsiege; - - public static UnitCommandType Lift; - - public static UnitCommandType Land; - - public static UnitCommandType Load; - - public static UnitCommandType Unload; - - public static UnitCommandType Unload_All; - - public static UnitCommandType Unload_All_Position; - - public static UnitCommandType Right_Click_Position; - - public static UnitCommandType Right_Click_Unit; - - public static UnitCommandType Halt_Construction; - - public static UnitCommandType Cancel_Construction; - - public static UnitCommandType Cancel_Addon; - - public static UnitCommandType Cancel_Train; - - public static UnitCommandType Cancel_Train_Slot; - - public static UnitCommandType Cancel_Morph; - - public static UnitCommandType Cancel_Research; - - public static UnitCommandType Cancel_Upgrade; - - public static UnitCommandType Use_Tech; - - public static UnitCommandType Use_Tech_Position; - - public static UnitCommandType Use_Tech_Unit; - - public static UnitCommandType Place_COP; - - public static UnitCommandType None; - - public static UnitCommandType Unknown; - - - private static Map instances = new HashMap(); - - private UnitCommandType(long pointer) { - this.pointer = pointer; - } - - private static UnitCommandType get(long pointer) { - if (pointer == 0 ) { - return null; - } - UnitCommandType instance = instances.get(pointer); - if (instance == null ) { - instance = new UnitCommandType(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String toString_native(long pointer); - - -} diff --git a/generated/bwapi4/UnitFilter.java b/generated/bwapi4/UnitFilter.java deleted file mode 100644 index 99f65d6..0000000 --- a/generated/bwapi4/UnitFilter.java +++ /dev/null @@ -1,31 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class UnitFilter { - - - private static Map instances = new HashMap(); - - private UnitFilter(long pointer) { - this.pointer = pointer; - } - - private static UnitFilter get(long pointer) { - UnitFilter instance = instances.get(pointer); - if (instance == null ) { - instance = new UnitFilter(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - -} diff --git a/generated/bwapi4/UnitSizeType.java b/generated/bwapi4/UnitSizeType.java deleted file mode 100644 index 7633b99..0000000 --- a/generated/bwapi4/UnitSizeType.java +++ /dev/null @@ -1,52 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class UnitSizeType { - - public String toString() { - return toString_native(pointer); - } - - public static UnitSizeType Independent; - - public static UnitSizeType Small; - - public static UnitSizeType Medium; - - public static UnitSizeType Large; - - public static UnitSizeType None; - - public static UnitSizeType Unknown; - - - private static Map instances = new HashMap(); - - private UnitSizeType(long pointer) { - this.pointer = pointer; - } - - private static UnitSizeType get(long pointer) { - if (pointer == 0 ) { - return null; - } - UnitSizeType instance = instances.get(pointer); - if (instance == null ) { - instance = new UnitSizeType(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String toString_native(long pointer); - - -} diff --git a/generated/bwapi4/UnitType.java b/generated/bwapi4/UnitType.java deleted file mode 100644 index ae0acc8..0000000 --- a/generated/bwapi4/UnitType.java +++ /dev/null @@ -1,894 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class UnitType { - - public String toString() { - return toString_native(pointer); - } - - public Race getRace() { - return getRace_native(pointer); - } - - public TechType requiredTech() { - return requiredTech_native(pointer); - } - - public TechType cloakingTech() { - return cloakingTech_native(pointer); - } - - public UpgradeType armorUpgrade() { - return armorUpgrade_native(pointer); - } - - public int maxHitPoints() { - return maxHitPoints_native(pointer); - } - - public int maxShields() { - return maxShields_native(pointer); - } - - public int maxEnergy() { - return maxEnergy_native(pointer); - } - - public int armor() { - return armor_native(pointer); - } - - public int mineralPrice() { - return mineralPrice_native(pointer); - } - - public int gasPrice() { - return gasPrice_native(pointer); - } - - public int buildTime() { - return buildTime_native(pointer); - } - - public int supplyRequired() { - return supplyRequired_native(pointer); - } - - public int supplyProvided() { - return supplyProvided_native(pointer); - } - - public int spaceRequired() { - return spaceRequired_native(pointer); - } - - public int spaceProvided() { - return spaceProvided_native(pointer); - } - - public int buildScore() { - return buildScore_native(pointer); - } - - public int destroyScore() { - return destroyScore_native(pointer); - } - - public UnitSizeType size() { - return size_native(pointer); - } - - public int tileWidth() { - return tileWidth_native(pointer); - } - - public int tileHeight() { - return tileHeight_native(pointer); - } - - public TilePosition tileSize() { - return tileSize_native(pointer); - } - - public int dimensionLeft() { - return dimensionLeft_native(pointer); - } - - public int dimensionUp() { - return dimensionUp_native(pointer); - } - - public int dimensionRight() { - return dimensionRight_native(pointer); - } - - public int dimensionDown() { - return dimensionDown_native(pointer); - } - - public int width() { - return width_native(pointer); - } - - public int height() { - return height_native(pointer); - } - - public int seekRange() { - return seekRange_native(pointer); - } - - public int sightRange() { - return sightRange_native(pointer); - } - - public WeaponType groundWeapon() { - return groundWeapon_native(pointer); - } - - public int maxGroundHits() { - return maxGroundHits_native(pointer); - } - - public WeaponType airWeapon() { - return airWeapon_native(pointer); - } - - public int maxAirHits() { - return maxAirHits_native(pointer); - } - - public double topSpeed() { - return topSpeed_native(pointer); - } - - public int acceleration() { - return acceleration_native(pointer); - } - - public int haltDistance() { - return haltDistance_native(pointer); - } - - public int turnRadius() { - return turnRadius_native(pointer); - } - - public boolean canProduce() { - return canProduce_native(pointer); - } - - public boolean canAttack() { - return canAttack_native(pointer); - } - - public boolean canMove() { - return canMove_native(pointer); - } - - public boolean isFlyer() { - return isFlyer_native(pointer); - } - - public boolean regeneratesHP() { - return regeneratesHP_native(pointer); - } - - public boolean isSpellcaster() { - return isSpellcaster_native(pointer); - } - - public boolean hasPermanentCloak() { - return hasPermanentCloak_native(pointer); - } - - public boolean isInvincible() { - return isInvincible_native(pointer); - } - - public boolean isOrganic() { - return isOrganic_native(pointer); - } - - public boolean isMechanical() { - return isMechanical_native(pointer); - } - - public boolean isRobotic() { - return isRobotic_native(pointer); - } - - public boolean isDetector() { - return isDetector_native(pointer); - } - - public boolean isResourceContainer() { - return isResourceContainer_native(pointer); - } - - public boolean isResourceDepot() { - return isResourceDepot_native(pointer); - } - - public boolean isRefinery() { - return isRefinery_native(pointer); - } - - public boolean isWorker() { - return isWorker_native(pointer); - } - - public boolean requiresPsi() { - return requiresPsi_native(pointer); - } - - public boolean requiresCreep() { - return requiresCreep_native(pointer); - } - - public boolean isTwoUnitsInOneEgg() { - return isTwoUnitsInOneEgg_native(pointer); - } - - public boolean isBurrowable() { - return isBurrowable_native(pointer); - } - - public boolean isCloakable() { - return isCloakable_native(pointer); - } - - public boolean isBuilding() { - return isBuilding_native(pointer); - } - - public boolean isAddon() { - return isAddon_native(pointer); - } - - public boolean isFlyingBuilding() { - return isFlyingBuilding_native(pointer); - } - - public boolean isNeutral() { - return isNeutral_native(pointer); - } - - public boolean isHero() { - return isHero_native(pointer); - } - - public boolean isPowerup() { - return isPowerup_native(pointer); - } - - public boolean isBeacon() { - return isBeacon_native(pointer); - } - - public boolean isFlagBeacon() { - return isFlagBeacon_native(pointer); - } - - public boolean isSpecialBuilding() { - return isSpecialBuilding_native(pointer); - } - - public boolean isSpell() { - return isSpell_native(pointer); - } - - public boolean producesLarva() { - return producesLarva_native(pointer); - } - - public boolean isMineralField() { - return isMineralField_native(pointer); - } - - public boolean isCritter() { - return isCritter_native(pointer); - } - - public boolean canBuildAddon() { - return canBuildAddon_native(pointer); - } - - public static UnitType Terran_Marine; - - public static UnitType Terran_Ghost; - - public static UnitType Terran_Vulture; - - public static UnitType Terran_Goliath; - - public static UnitType Terran_Siege_Tank_Tank_Mode; - - public static UnitType Terran_SCV; - - public static UnitType Terran_Wraith; - - public static UnitType Terran_Science_Vessel; - - public static UnitType Hero_Gui_Montag; - - public static UnitType Terran_Dropship; - - public static UnitType Terran_Battlecruiser; - - public static UnitType Terran_Vulture_Spider_Mine; - - public static UnitType Terran_Nuclear_Missile; - - public static UnitType Terran_Civilian; - - public static UnitType Hero_Sarah_Kerrigan; - - public static UnitType Hero_Alan_Schezar; - - public static UnitType Hero_Jim_Raynor_Vulture; - - public static UnitType Hero_Jim_Raynor_Marine; - - public static UnitType Hero_Tom_Kazansky; - - public static UnitType Hero_Magellan; - - public static UnitType Hero_Edmund_Duke_Tank_Mode; - - public static UnitType Hero_Edmund_Duke_Siege_Mode; - - public static UnitType Hero_Arcturus_Mengsk; - - public static UnitType Hero_Hyperion; - - public static UnitType Hero_Norad_II; - - public static UnitType Terran_Siege_Tank_Siege_Mode; - - public static UnitType Terran_Firebat; - - public static UnitType Spell_Scanner_Sweep; - - public static UnitType Terran_Medic; - - public static UnitType Zerg_Larva; - - public static UnitType Zerg_Egg; - - public static UnitType Zerg_Zergling; - - public static UnitType Zerg_Hydralisk; - - public static UnitType Zerg_Ultralisk; - - public static UnitType Zerg_Broodling; - - public static UnitType Zerg_Drone; - - public static UnitType Zerg_Overlord; - - public static UnitType Zerg_Mutalisk; - - public static UnitType Zerg_Guardian; - - public static UnitType Zerg_Queen; - - public static UnitType Zerg_Defiler; - - public static UnitType Zerg_Scourge; - - public static UnitType Hero_Torrasque; - - public static UnitType Hero_Matriarch; - - public static UnitType Zerg_Infested_Terran; - - public static UnitType Hero_Infested_Kerrigan; - - public static UnitType Hero_Unclean_One; - - public static UnitType Hero_Hunter_Killer; - - public static UnitType Hero_Devouring_One; - - public static UnitType Hero_Kukulza_Mutalisk; - - public static UnitType Hero_Kukulza_Guardian; - - public static UnitType Hero_Yggdrasill; - - public static UnitType Terran_Valkyrie; - - public static UnitType Zerg_Cocoon; - - public static UnitType Protoss_Corsair; - - public static UnitType Protoss_Dark_Templar; - - public static UnitType Zerg_Devourer; - - public static UnitType Protoss_Dark_Archon; - - public static UnitType Protoss_Probe; - - public static UnitType Protoss_Zealot; - - public static UnitType Protoss_Dragoon; - - public static UnitType Protoss_High_Templar; - - public static UnitType Protoss_Archon; - - public static UnitType Protoss_Shuttle; - - public static UnitType Protoss_Scout; - - public static UnitType Protoss_Arbiter; - - public static UnitType Protoss_Carrier; - - public static UnitType Protoss_Interceptor; - - public static UnitType Hero_Dark_Templar; - - public static UnitType Hero_Zeratul; - - public static UnitType Hero_Tassadar_Zeratul_Archon; - - public static UnitType Hero_Fenix_Zealot; - - public static UnitType Hero_Fenix_Dragoon; - - public static UnitType Hero_Tassadar; - - public static UnitType Hero_Mojo; - - public static UnitType Hero_Warbringer; - - public static UnitType Hero_Gantrithor; - - public static UnitType Protoss_Reaver; - - public static UnitType Protoss_Observer; - - public static UnitType Protoss_Scarab; - - public static UnitType Hero_Danimoth; - - public static UnitType Hero_Aldaris; - - public static UnitType Hero_Artanis; - - public static UnitType Critter_Rhynadon; - - public static UnitType Critter_Bengalaas; - - public static UnitType Special_Cargo_Ship; - - public static UnitType Special_Mercenary_Gunship; - - public static UnitType Critter_Scantid; - - public static UnitType Critter_Kakaru; - - public static UnitType Critter_Ragnasaur; - - public static UnitType Critter_Ursadon; - - public static UnitType Zerg_Lurker_Egg; - - public static UnitType Hero_Raszagal; - - public static UnitType Hero_Samir_Duran; - - public static UnitType Hero_Alexei_Stukov; - - public static UnitType Special_Map_Revealer; - - public static UnitType Hero_Gerard_DuGalle; - - public static UnitType Zerg_Lurker; - - public static UnitType Hero_Infested_Duran; - - public static UnitType Spell_Disruption_Web; - - public static UnitType Terran_Command_Center; - - public static UnitType Terran_Comsat_Station; - - public static UnitType Terran_Nuclear_Silo; - - public static UnitType Terran_Supply_Depot; - - public static UnitType Terran_Refinery; - - public static UnitType Terran_Barracks; - - public static UnitType Terran_Academy; - - public static UnitType Terran_Factory; - - public static UnitType Terran_Starport; - - public static UnitType Terran_Control_Tower; - - public static UnitType Terran_Science_Facility; - - public static UnitType Terran_Covert_Ops; - - public static UnitType Terran_Physics_Lab; - - public static UnitType Terran_Machine_Shop; - - public static UnitType Terran_Engineering_Bay; - - public static UnitType Terran_Armory; - - public static UnitType Terran_Missile_Turret; - - public static UnitType Terran_Bunker; - - public static UnitType Special_Crashed_Norad_II; - - public static UnitType Special_Ion_Cannon; - - public static UnitType Powerup_Uraj_Crystal; - - public static UnitType Powerup_Khalis_Crystal; - - public static UnitType Zerg_Infested_Command_Center; - - public static UnitType Zerg_Hatchery; - - public static UnitType Zerg_Lair; - - public static UnitType Zerg_Hive; - - public static UnitType Zerg_Nydus_Canal; - - public static UnitType Zerg_Hydralisk_Den; - - public static UnitType Zerg_Defiler_Mound; - - public static UnitType Zerg_Greater_Spire; - - public static UnitType Zerg_Queens_Nest; - - public static UnitType Zerg_Evolution_Chamber; - - public static UnitType Zerg_Ultralisk_Cavern; - - public static UnitType Zerg_Spire; - - public static UnitType Zerg_Spawning_Pool; - - public static UnitType Zerg_Creep_Colony; - - public static UnitType Zerg_Spore_Colony; - - public static UnitType Zerg_Sunken_Colony; - - public static UnitType Special_Overmind_With_Shell; - - public static UnitType Special_Overmind; - - public static UnitType Zerg_Extractor; - - public static UnitType Special_Mature_Chrysalis; - - public static UnitType Special_Cerebrate; - - public static UnitType Special_Cerebrate_Daggoth; - - public static UnitType Protoss_Nexus; - - public static UnitType Protoss_Robotics_Facility; - - public static UnitType Protoss_Pylon; - - public static UnitType Protoss_Assimilator; - - public static UnitType Protoss_Observatory; - - public static UnitType Protoss_Gateway; - - public static UnitType Protoss_Photon_Cannon; - - public static UnitType Protoss_Citadel_of_Adun; - - public static UnitType Protoss_Cybernetics_Core; - - public static UnitType Protoss_Templar_Archives; - - public static UnitType Protoss_Forge; - - public static UnitType Protoss_Stargate; - - public static UnitType Special_Stasis_Cell_Prison; - - public static UnitType Protoss_Fleet_Beacon; - - public static UnitType Protoss_Arbiter_Tribunal; - - public static UnitType Protoss_Robotics_Support_Bay; - - public static UnitType Protoss_Shield_Battery; - - public static UnitType Special_Khaydarin_Crystal_Form; - - public static UnitType Special_Protoss_Temple; - - public static UnitType Special_XelNaga_Temple; - - public static UnitType Resource_Mineral_Field; - - public static UnitType Resource_Mineral_Field_Type_2; - - public static UnitType Resource_Mineral_Field_Type_3; - - public static UnitType Special_Independant_Starport; - - public static UnitType Resource_Vespene_Geyser; - - public static UnitType Special_Warp_Gate; - - public static UnitType Special_Psi_Disrupter; - - public static UnitType Special_Zerg_Beacon; - - public static UnitType Special_Terran_Beacon; - - public static UnitType Special_Protoss_Beacon; - - public static UnitType Special_Zerg_Flag_Beacon; - - public static UnitType Special_Terran_Flag_Beacon; - - public static UnitType Special_Protoss_Flag_Beacon; - - public static UnitType Special_Power_Generator; - - public static UnitType Special_Overmind_Cocoon; - - public static UnitType Spell_Dark_Swarm; - - public static UnitType Special_Floor_Missile_Trap; - - public static UnitType Special_Floor_Hatch; - - public static UnitType Special_Upper_Level_Door; - - public static UnitType Special_Right_Upper_Level_Door; - - public static UnitType Special_Pit_Door; - - public static UnitType Special_Right_Pit_Door; - - public static UnitType Special_Floor_Gun_Trap; - - public static UnitType Special_Wall_Missile_Trap; - - public static UnitType Special_Wall_Flame_Trap; - - public static UnitType Special_Right_Wall_Missile_Trap; - - public static UnitType Special_Right_Wall_Flame_Trap; - - public static UnitType Special_Start_Location; - - public static UnitType Powerup_Flag; - - public static UnitType Powerup_Young_Chrysalis; - - public static UnitType Powerup_Psi_Emitter; - - public static UnitType Powerup_Data_Disk; - - public static UnitType Powerup_Khaydarin_Crystal; - - public static UnitType Powerup_Mineral_Cluster_Type_1; - - public static UnitType Powerup_Mineral_Cluster_Type_2; - - public static UnitType Powerup_Protoss_Gas_Orb_Type_1; - - public static UnitType Powerup_Protoss_Gas_Orb_Type_2; - - public static UnitType Powerup_Zerg_Gas_Sac_Type_1; - - public static UnitType Powerup_Zerg_Gas_Sac_Type_2; - - public static UnitType Powerup_Terran_Gas_Tank_Type_1; - - public static UnitType Powerup_Terran_Gas_Tank_Type_2; - - public static UnitType None; - - public static UnitType AllUnits; - - public static UnitType Men; - - public static UnitType Buildings; - - public static UnitType Factories; - - public static UnitType Unknown; - - - private static Map instances = new HashMap(); - - private UnitType(long pointer) { - this.pointer = pointer; - } - - private static UnitType get(long pointer) { - if (pointer == 0 ) { - return null; - } - UnitType instance = instances.get(pointer); - if (instance == null ) { - instance = new UnitType(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String toString_native(long pointer); - - private native Race getRace_native(long pointer); - - private native TechType requiredTech_native(long pointer); - - private native TechType cloakingTech_native(long pointer); - - private native UpgradeType armorUpgrade_native(long pointer); - - private native int maxHitPoints_native(long pointer); - - private native int maxShields_native(long pointer); - - private native int maxEnergy_native(long pointer); - - private native int armor_native(long pointer); - - private native int mineralPrice_native(long pointer); - - private native int gasPrice_native(long pointer); - - private native int buildTime_native(long pointer); - - private native int supplyRequired_native(long pointer); - - private native int supplyProvided_native(long pointer); - - private native int spaceRequired_native(long pointer); - - private native int spaceProvided_native(long pointer); - - private native int buildScore_native(long pointer); - - private native int destroyScore_native(long pointer); - - private native UnitSizeType size_native(long pointer); - - private native int tileWidth_native(long pointer); - - private native int tileHeight_native(long pointer); - - private native TilePosition tileSize_native(long pointer); - - private native int dimensionLeft_native(long pointer); - - private native int dimensionUp_native(long pointer); - - private native int dimensionRight_native(long pointer); - - private native int dimensionDown_native(long pointer); - - private native int width_native(long pointer); - - private native int height_native(long pointer); - - private native int seekRange_native(long pointer); - - private native int sightRange_native(long pointer); - - private native WeaponType groundWeapon_native(long pointer); - - private native int maxGroundHits_native(long pointer); - - private native WeaponType airWeapon_native(long pointer); - - private native int maxAirHits_native(long pointer); - - private native double topSpeed_native(long pointer); - - private native int acceleration_native(long pointer); - - private native int haltDistance_native(long pointer); - - private native int turnRadius_native(long pointer); - - private native boolean canProduce_native(long pointer); - - private native boolean canAttack_native(long pointer); - - private native boolean canMove_native(long pointer); - - private native boolean isFlyer_native(long pointer); - - private native boolean regeneratesHP_native(long pointer); - - private native boolean isSpellcaster_native(long pointer); - - private native boolean hasPermanentCloak_native(long pointer); - - private native boolean isInvincible_native(long pointer); - - private native boolean isOrganic_native(long pointer); - - private native boolean isMechanical_native(long pointer); - - private native boolean isRobotic_native(long pointer); - - private native boolean isDetector_native(long pointer); - - private native boolean isResourceContainer_native(long pointer); - - private native boolean isResourceDepot_native(long pointer); - - private native boolean isRefinery_native(long pointer); - - private native boolean isWorker_native(long pointer); - - private native boolean requiresPsi_native(long pointer); - - private native boolean requiresCreep_native(long pointer); - - private native boolean isTwoUnitsInOneEgg_native(long pointer); - - private native boolean isBurrowable_native(long pointer); - - private native boolean isCloakable_native(long pointer); - - private native boolean isBuilding_native(long pointer); - - private native boolean isAddon_native(long pointer); - - private native boolean isFlyingBuilding_native(long pointer); - - private native boolean isNeutral_native(long pointer); - - private native boolean isHero_native(long pointer); - - private native boolean isPowerup_native(long pointer); - - private native boolean isBeacon_native(long pointer); - - private native boolean isFlagBeacon_native(long pointer); - - private native boolean isSpecialBuilding_native(long pointer); - - private native boolean isSpell_native(long pointer); - - private native boolean producesLarva_native(long pointer); - - private native boolean isMineralField_native(long pointer); - - private native boolean isCritter_native(long pointer); - - private native boolean canBuildAddon_native(long pointer); - - -} diff --git a/generated/bwapi4/Unitset.java b/generated/bwapi4/Unitset.java deleted file mode 100644 index 9444d33..0000000 --- a/generated/bwapi4/Unitset.java +++ /dev/null @@ -1,358 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class Unitset { - - public Position getPosition() { - return getPosition_native(pointer); - } - - public List getLoadedUnits() { - return getLoadedUnits_native(pointer); - } - - public List getInterceptors() { - return getInterceptors_native(pointer); - } - - public List getLarva() { - return getLarva_native(pointer); - } - - public boolean issueCommand(UnitCommand command) { - return issueCommand_native(pointer, command); - } - - public boolean attack(PositionOrUnit target) { - return attack_native(pointer, target); - } - - public boolean attack(PositionOrUnit target, boolean shiftQueueCommand) { - return attack_native(pointer, target, shiftQueueCommand); - } - - public boolean build(UnitType type) { - return build_native(pointer, type); - } - - public boolean build(UnitType type, TilePosition target) { - return build_native(pointer, type, target); - } - - public boolean buildAddon(UnitType type) { - return buildAddon_native(pointer, type); - } - - public boolean train(UnitType type) { - return train_native(pointer, type); - } - - public boolean morph(UnitType type) { - return morph_native(pointer, type); - } - - public boolean setRallyPoint(PositionOrUnit target) { - return setRallyPoint_native(pointer, target); - } - - public boolean move(Position target) { - return move_native(pointer, target); - } - - public boolean move(Position target, boolean shiftQueueCommand) { - return move_native(pointer, target, shiftQueueCommand); - } - - public boolean patrol(Position target) { - return patrol_native(pointer, target); - } - - public boolean patrol(Position target, boolean shiftQueueCommand) { - return patrol_native(pointer, target, shiftQueueCommand); - } - - public boolean holdPosition() { - return holdPosition_native(pointer); - } - - public boolean holdPosition(boolean shiftQueueCommand) { - return holdPosition_native(pointer, shiftQueueCommand); - } - - public boolean stop() { - return stop_native(pointer); - } - - public boolean stop(boolean shiftQueueCommand) { - return stop_native(pointer, shiftQueueCommand); - } - - public boolean follow(Unit target) { - return follow_native(pointer, target); - } - - public boolean follow(Unit target, boolean shiftQueueCommand) { - return follow_native(pointer, target, shiftQueueCommand); - } - - public boolean gather(Unit target) { - return gather_native(pointer, target); - } - - public boolean gather(Unit target, boolean shiftQueueCommand) { - return gather_native(pointer, target, shiftQueueCommand); - } - - public boolean returnCargo() { - return returnCargo_native(pointer); - } - - public boolean returnCargo(boolean shiftQueueCommand) { - return returnCargo_native(pointer, shiftQueueCommand); - } - - public boolean repair(Unit target) { - return repair_native(pointer, target); - } - - public boolean repair(Unit target, boolean shiftQueueCommand) { - return repair_native(pointer, target, shiftQueueCommand); - } - - public boolean burrow() { - return burrow_native(pointer); - } - - public boolean unburrow() { - return unburrow_native(pointer); - } - - public boolean cloak() { - return cloak_native(pointer); - } - - public boolean decloak() { - return decloak_native(pointer); - } - - public boolean siege() { - return siege_native(pointer); - } - - public boolean unsiege() { - return unsiege_native(pointer); - } - - public boolean lift() { - return lift_native(pointer); - } - - public boolean load(Unit target) { - return load_native(pointer, target); - } - - public boolean load(Unit target, boolean shiftQueueCommand) { - return load_native(pointer, target, shiftQueueCommand); - } - - public boolean unloadAll() { - return unloadAll_native(pointer); - } - - public boolean unloadAll(boolean shiftQueueCommand) { - return unloadAll_native(pointer, shiftQueueCommand); - } - - public boolean unloadAll(Position target) { - return unloadAll_native(pointer, target); - } - - public boolean unloadAll(Position target, boolean shiftQueueCommand) { - return unloadAll_native(pointer, target, shiftQueueCommand); - } - - public boolean rightClick(PositionOrUnit target) { - return rightClick_native(pointer, target); - } - - public boolean rightClick(PositionOrUnit target, boolean shiftQueueCommand) { - return rightClick_native(pointer, target, shiftQueueCommand); - } - - public boolean haltConstruction() { - return haltConstruction_native(pointer); - } - - public boolean cancelConstruction() { - return cancelConstruction_native(pointer); - } - - public boolean cancelAddon() { - return cancelAddon_native(pointer); - } - - public boolean cancelTrain() { - return cancelTrain_native(pointer); - } - - public boolean cancelTrain(int slot) { - return cancelTrain_native(pointer, slot); - } - - public boolean cancelMorph() { - return cancelMorph_native(pointer); - } - - public boolean cancelResearch() { - return cancelResearch_native(pointer); - } - - public boolean cancelUpgrade() { - return cancelUpgrade_native(pointer); - } - - public boolean useTech(TechType tech) { - return useTech_native(pointer, tech); - } - - public boolean useTech(TechType tech, PositionOrUnit target) { - return useTech_native(pointer, tech, target); - } - - - private static Map instances = new HashMap(); - - private Unitset(long pointer) { - this.pointer = pointer; - } - - private static Unitset get(long pointer) { - if (pointer == 0 ) { - return null; - } - Unitset instance = instances.get(pointer); - if (instance == null ) { - instance = new Unitset(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native Position getPosition_native(long pointer); - - private native List getLoadedUnits_native(long pointer); - - private native List getInterceptors_native(long pointer); - - private native List getLarva_native(long pointer); - - private native boolean issueCommand_native(long pointer, UnitCommand command); - - private native boolean attack_native(long pointer, PositionOrUnit target); - - private native boolean attack_native(long pointer, PositionOrUnit target, boolean shiftQueueCommand); - - private native boolean build_native(long pointer, UnitType type); - - private native boolean build_native(long pointer, UnitType type, TilePosition target); - - private native boolean buildAddon_native(long pointer, UnitType type); - - private native boolean train_native(long pointer, UnitType type); - - private native boolean morph_native(long pointer, UnitType type); - - private native boolean setRallyPoint_native(long pointer, PositionOrUnit target); - - private native boolean move_native(long pointer, Position target); - - private native boolean move_native(long pointer, Position target, boolean shiftQueueCommand); - - private native boolean patrol_native(long pointer, Position target); - - private native boolean patrol_native(long pointer, Position target, boolean shiftQueueCommand); - - private native boolean holdPosition_native(long pointer); - - private native boolean holdPosition_native(long pointer, boolean shiftQueueCommand); - - private native boolean stop_native(long pointer); - - private native boolean stop_native(long pointer, boolean shiftQueueCommand); - - private native boolean follow_native(long pointer, Unit target); - - private native boolean follow_native(long pointer, Unit target, boolean shiftQueueCommand); - - private native boolean gather_native(long pointer, Unit target); - - private native boolean gather_native(long pointer, Unit target, boolean shiftQueueCommand); - - private native boolean returnCargo_native(long pointer); - - private native boolean returnCargo_native(long pointer, boolean shiftQueueCommand); - - private native boolean repair_native(long pointer, Unit target); - - private native boolean repair_native(long pointer, Unit target, boolean shiftQueueCommand); - - private native boolean burrow_native(long pointer); - - private native boolean unburrow_native(long pointer); - - private native boolean cloak_native(long pointer); - - private native boolean decloak_native(long pointer); - - private native boolean siege_native(long pointer); - - private native boolean unsiege_native(long pointer); - - private native boolean lift_native(long pointer); - - private native boolean load_native(long pointer, Unit target); - - private native boolean load_native(long pointer, Unit target, boolean shiftQueueCommand); - - private native boolean unloadAll_native(long pointer); - - private native boolean unloadAll_native(long pointer, boolean shiftQueueCommand); - - private native boolean unloadAll_native(long pointer, Position target); - - private native boolean unloadAll_native(long pointer, Position target, boolean shiftQueueCommand); - - private native boolean rightClick_native(long pointer, PositionOrUnit target); - - private native boolean rightClick_native(long pointer, PositionOrUnit target, boolean shiftQueueCommand); - - private native boolean haltConstruction_native(long pointer); - - private native boolean cancelConstruction_native(long pointer); - - private native boolean cancelAddon_native(long pointer); - - private native boolean cancelTrain_native(long pointer); - - private native boolean cancelTrain_native(long pointer, int slot); - - private native boolean cancelMorph_native(long pointer); - - private native boolean cancelResearch_native(long pointer); - - private native boolean cancelUpgrade_native(long pointer); - - private native boolean useTech_native(long pointer, TechType tech); - - private native boolean useTech_native(long pointer, TechType tech, PositionOrUnit target); - - -} diff --git a/generated/bwapi4/UpgradeType.java b/generated/bwapi4/UpgradeType.java deleted file mode 100644 index 0d1e163..0000000 --- a/generated/bwapi4/UpgradeType.java +++ /dev/null @@ -1,230 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class UpgradeType { - - public String toString() { - return toString_native(pointer); - } - - public Race getRace() { - return getRace_native(pointer); - } - - public int mineralPrice() { - return mineralPrice_native(pointer); - } - - public int mineralPrice(int level) { - return mineralPrice_native(pointer, level); - } - - public int mineralPriceFactor() { - return mineralPriceFactor_native(pointer); - } - - public int gasPrice() { - return gasPrice_native(pointer); - } - - public int gasPrice(int level) { - return gasPrice_native(pointer, level); - } - - public int gasPriceFactor() { - return gasPriceFactor_native(pointer); - } - - public int upgradeTime() { - return upgradeTime_native(pointer); - } - - public int upgradeTime(int level) { - return upgradeTime_native(pointer, level); - } - - public int upgradeTimeFactor() { - return upgradeTimeFactor_native(pointer); - } - - public int maxRepeats() { - return maxRepeats_native(pointer); - } - - public UnitType whatUpgrades() { - return whatUpgrades_native(pointer); - } - - public UnitType whatsRequired() { - return whatsRequired_native(pointer); - } - - public UnitType whatsRequired(int level) { - return whatsRequired_native(pointer, level); - } - - public static UpgradeType Terran_Infantry_Armor; - - public static UpgradeType Terran_Vehicle_Plating; - - public static UpgradeType Terran_Ship_Plating; - - public static UpgradeType Zerg_Carapace; - - public static UpgradeType Zerg_Flyer_Carapace; - - public static UpgradeType Protoss_Ground_Armor; - - public static UpgradeType Protoss_Air_Armor; - - public static UpgradeType Terran_Infantry_Weapons; - - public static UpgradeType Terran_Vehicle_Weapons; - - public static UpgradeType Terran_Ship_Weapons; - - public static UpgradeType Zerg_Melee_Attacks; - - public static UpgradeType Zerg_Missile_Attacks; - - public static UpgradeType Zerg_Flyer_Attacks; - - public static UpgradeType Protoss_Ground_Weapons; - - public static UpgradeType Protoss_Air_Weapons; - - public static UpgradeType Protoss_Plasma_Shields; - - public static UpgradeType U_238_Shells; - - public static UpgradeType Ion_Thrusters; - - public static UpgradeType Titan_Reactor; - - public static UpgradeType Ocular_Implants; - - public static UpgradeType Moebius_Reactor; - - public static UpgradeType Apollo_Reactor; - - public static UpgradeType Colossus_Reactor; - - public static UpgradeType Ventral_Sacs; - - public static UpgradeType Antennae; - - public static UpgradeType Pneumatized_Carapace; - - public static UpgradeType Metabolic_Boost; - - public static UpgradeType Adrenal_Glands; - - public static UpgradeType Muscular_Augments; - - public static UpgradeType Grooved_Spines; - - public static UpgradeType Gamete_Meiosis; - - public static UpgradeType Metasynaptic_Node; - - public static UpgradeType Singularity_Charge; - - public static UpgradeType Leg_Enhancements; - - public static UpgradeType Scarab_Damage; - - public static UpgradeType Reaver_Capacity; - - public static UpgradeType Gravitic_Drive; - - public static UpgradeType Sensor_Array; - - public static UpgradeType Gravitic_Boosters; - - public static UpgradeType Khaydarin_Amulet; - - public static UpgradeType Apial_Sensors; - - public static UpgradeType Gravitic_Thrusters; - - public static UpgradeType Carrier_Capacity; - - public static UpgradeType Khaydarin_Core; - - public static UpgradeType Argus_Jewel; - - public static UpgradeType Argus_Talisman; - - public static UpgradeType Caduceus_Reactor; - - public static UpgradeType Chitinous_Plating; - - public static UpgradeType Anabolic_Synthesis; - - public static UpgradeType Charon_Boosters; - - public static UpgradeType Upgrade_60; - - public static UpgradeType None; - - public static UpgradeType Unknown; - - - private static Map instances = new HashMap(); - - private UpgradeType(long pointer) { - this.pointer = pointer; - } - - private static UpgradeType get(long pointer) { - if (pointer == 0 ) { - return null; - } - UpgradeType instance = instances.get(pointer); - if (instance == null ) { - instance = new UpgradeType(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String toString_native(long pointer); - - private native Race getRace_native(long pointer); - - private native int mineralPrice_native(long pointer); - - private native int mineralPrice_native(long pointer, int level); - - private native int mineralPriceFactor_native(long pointer); - - private native int gasPrice_native(long pointer); - - private native int gasPrice_native(long pointer, int level); - - private native int gasPriceFactor_native(long pointer); - - private native int upgradeTime_native(long pointer); - - private native int upgradeTime_native(long pointer, int level); - - private native int upgradeTimeFactor_native(long pointer); - - private native int maxRepeats_native(long pointer); - - private native UnitType whatUpgrades_native(long pointer); - - private native UnitType whatsRequired_native(long pointer); - - private native UnitType whatsRequired_native(long pointer, int level); - - -} diff --git a/generated/bwapi4/Utils.java b/generated/bwapi4/Utils.java deleted file mode 100644 index 1a6154c..0000000 --- a/generated/bwapi4/Utils.java +++ /dev/null @@ -1,52 +0,0 @@ -package bwapi4; - -import java.lang.String; -import java.lang.System; - -/** - * - */ -public class Utils { - - public static final byte Previous = 0x01; - public static final byte Cyan = 0x02; - public static final byte Yellow = 0x03; - public static final byte White = 0x04; - public static final byte Grey = 0x05; - public static final byte Red = 0x06; - public static final byte Green = 0x07; - public static final byte Red_P1 = 0x08; - public static final byte Tab = 0x09; - public static final byte Newline = 0x0A; - public static final byte Invisible_no_override = 0x0B; - public static final byte Remove_beyond = 0x0C; - public static final byte Clear_formatting = 0x0D; - public static final byte Blue = 0x0E; - public static final byte Teal = 0x0F; - public static final byte Purple = 0x10; - public static final byte Orange = 0x11; - public static final byte Right_Align = 0x12; - public static final byte Center_Align = 0x13; - public static final byte Invisible = 0x14; - public static final byte Brown = 0x15; - public static final byte White_p7 = 0x16; - public static final byte Yellow_p8 = 0x17; - public static final byte Green_p9 = 0x18; - public static final byte Brighter_Yellow = 0x19; - public static final byte Cyan_default = 0x1A; - public static final byte Pinkish = 0x1B; - public static final byte Dark_Cyan = 0x1C; - public static final byte Greygreen = 0x1D; - public static final byte Bluegrey = 0x1E; - public static final byte Turquoise = 0x1F; - - public static String formatText(String text, byte format){ - byte[] textData = text.getBytes(); - int textDataLength = text.length(); - - byte[] newTextData = new byte[textDataLength + 1]; - newTextData[0] = format; - System.arraycopy(textData, 0, newTextData, 1, textDataLength); - return new String(newTextData); - } -} \ No newline at end of file diff --git a/generated/bwapi4/WalkPosition.java b/generated/bwapi4/WalkPosition.java deleted file mode 100644 index 78e437f..0000000 --- a/generated/bwapi4/WalkPosition.java +++ /dev/null @@ -1,83 +0,0 @@ -package bwapi4; - -import java.lang.Override; -import java.util.HashMap; -import java.util.Map; - -public class WalkPosition extends AbstractPoint{ - - private int x, y; - - public WalkPosition(int x, int y) { - this.x = x; - this.y = y; - } - - public String toString() { - return "[" + x + ", " + y + "]"; - } - - public native boolean isValid(); - - public native WalkPosition makeValid(); - - public native int getApproxDistance(WalkPosition position); - - public native double getLength(); - - public int getX() { - return x; - } - - public int getY() { - return y; - } - - public static WalkPosition Invalid; - - public static WalkPosition None; - - public static WalkPosition Unknown; - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof WalkPosition)) return false; - - WalkPosition position = (WalkPosition) o; - - if (x != position.x) return false; - if (y != position.y) return false; - - return true; - } - - @Override - public int hashCode() { - int result = x; - result = 31 * result + y; - return result; - } - - - private static Map instances = new HashMap(); - - private WalkPosition(long pointer) { - this.pointer = pointer; - } - - private static WalkPosition get(long pointer) { - WalkPosition instance = instances.get(pointer); - if (instance == null) { - instance = new WalkPosition(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - public WalkPosition getPoint(){ - return this; - } -} \ No newline at end of file diff --git a/generated/bwapi4/WeaponType.java b/generated/bwapi4/WeaponType.java deleted file mode 100644 index edc5079..0000000 --- a/generated/bwapi4/WeaponType.java +++ /dev/null @@ -1,382 +0,0 @@ -package bwapi4; - -import bwapi4.*; - -import java.util.Map; -import java.util.HashMap; -import java.util.Collection; -import java.util.List; - -public class WeaponType { - - public String toString() { - return toString_native(pointer); - } - - public TechType getTech() { - return getTech_native(pointer); - } - - public UnitType whatUses() { - return whatUses_native(pointer); - } - - public int damageAmount() { - return damageAmount_native(pointer); - } - - public int damageBonus() { - return damageBonus_native(pointer); - } - - public int damageCooldown() { - return damageCooldown_native(pointer); - } - - public int damageFactor() { - return damageFactor_native(pointer); - } - - public UpgradeType upgradeType() { - return upgradeType_native(pointer); - } - - public DamageType damageType() { - return damageType_native(pointer); - } - - public ExplosionType explosionType() { - return explosionType_native(pointer); - } - - public int minRange() { - return minRange_native(pointer); - } - - public int maxRange() { - return maxRange_native(pointer); - } - - public int innerSplashRadius() { - return innerSplashRadius_native(pointer); - } - - public int medianSplashRadius() { - return medianSplashRadius_native(pointer); - } - - public int outerSplashRadius() { - return outerSplashRadius_native(pointer); - } - - public boolean targetsAir() { - return targetsAir_native(pointer); - } - - public boolean targetsGround() { - return targetsGround_native(pointer); - } - - public boolean targetsMechanical() { - return targetsMechanical_native(pointer); - } - - public boolean targetsOrganic() { - return targetsOrganic_native(pointer); - } - - public boolean targetsNonBuilding() { - return targetsNonBuilding_native(pointer); - } - - public boolean targetsNonRobotic() { - return targetsNonRobotic_native(pointer); - } - - public boolean targetsTerrain() { - return targetsTerrain_native(pointer); - } - - public boolean targetsOrgOrMech() { - return targetsOrgOrMech_native(pointer); - } - - public boolean targetsOwn() { - return targetsOwn_native(pointer); - } - - public static WeaponType Gauss_Rifle; - - public static WeaponType Gauss_Rifle_Jim_Raynor; - - public static WeaponType C_10_Canister_Rifle; - - public static WeaponType C_10_Canister_Rifle_Sarah_Kerrigan; - - public static WeaponType C_10_Canister_Rifle_Samir_Duran; - - public static WeaponType C_10_Canister_Rifle_Infested_Duran; - - public static WeaponType C_10_Canister_Rifle_Alexei_Stukov; - - public static WeaponType Fragmentation_Grenade; - - public static WeaponType Fragmentation_Grenade_Jim_Raynor; - - public static WeaponType Spider_Mines; - - public static WeaponType Twin_Autocannons; - - public static WeaponType Twin_Autocannons_Alan_Schezar; - - public static WeaponType Hellfire_Missile_Pack; - - public static WeaponType Hellfire_Missile_Pack_Alan_Schezar; - - public static WeaponType Arclite_Cannon; - - public static WeaponType Arclite_Cannon_Edmund_Duke; - - public static WeaponType Fusion_Cutter; - - public static WeaponType Gemini_Missiles; - - public static WeaponType Gemini_Missiles_Tom_Kazansky; - - public static WeaponType Burst_Lasers; - - public static WeaponType Burst_Lasers_Tom_Kazansky; - - public static WeaponType ATS_Laser_Battery; - - public static WeaponType ATS_Laser_Battery_Hero; - - public static WeaponType ATS_Laser_Battery_Hyperion; - - public static WeaponType ATA_Laser_Battery; - - public static WeaponType ATA_Laser_Battery_Hero; - - public static WeaponType ATA_Laser_Battery_Hyperion; - - public static WeaponType Flame_Thrower; - - public static WeaponType Flame_Thrower_Gui_Montag; - - public static WeaponType Arclite_Shock_Cannon; - - public static WeaponType Arclite_Shock_Cannon_Edmund_Duke; - - public static WeaponType Longbolt_Missile; - - public static WeaponType Claws; - - public static WeaponType Claws_Devouring_One; - - public static WeaponType Claws_Infested_Kerrigan; - - public static WeaponType Needle_Spines; - - public static WeaponType Needle_Spines_Hunter_Killer; - - public static WeaponType Kaiser_Blades; - - public static WeaponType Kaiser_Blades_Torrasque; - - public static WeaponType Toxic_Spores; - - public static WeaponType Spines; - - public static WeaponType Acid_Spore; - - public static WeaponType Acid_Spore_Kukulza; - - public static WeaponType Glave_Wurm; - - public static WeaponType Glave_Wurm_Kukulza; - - public static WeaponType Seeker_Spores; - - public static WeaponType Subterranean_Tentacle; - - public static WeaponType Suicide_Infested_Terran; - - public static WeaponType Suicide_Scourge; - - public static WeaponType Particle_Beam; - - public static WeaponType Psi_Blades; - - public static WeaponType Psi_Blades_Fenix; - - public static WeaponType Phase_Disruptor; - - public static WeaponType Phase_Disruptor_Fenix; - - public static WeaponType Psi_Assault; - - public static WeaponType Psionic_Shockwave; - - public static WeaponType Psionic_Shockwave_TZ_Archon; - - public static WeaponType Dual_Photon_Blasters; - - public static WeaponType Dual_Photon_Blasters_Mojo; - - public static WeaponType Dual_Photon_Blasters_Artanis; - - public static WeaponType Anti_Matter_Missiles; - - public static WeaponType Anti_Matter_Missiles_Mojo; - - public static WeaponType Anti_Matter_Missiles_Artanis; - - public static WeaponType Phase_Disruptor_Cannon; - - public static WeaponType Phase_Disruptor_Cannon_Danimoth; - - public static WeaponType Pulse_Cannon; - - public static WeaponType STS_Photon_Cannon; - - public static WeaponType STA_Photon_Cannon; - - public static WeaponType Scarab; - - public static WeaponType Neutron_Flare; - - public static WeaponType Halo_Rockets; - - public static WeaponType Corrosive_Acid; - - public static WeaponType Subterranean_Spines; - - public static WeaponType Warp_Blades; - - public static WeaponType Warp_Blades_Hero; - - public static WeaponType Warp_Blades_Zeratul; - - public static WeaponType Independant_Laser_Battery; - - public static WeaponType Twin_Autocannons_Floor_Trap; - - public static WeaponType Hellfire_Missile_Pack_Wall_Trap; - - public static WeaponType Flame_Thrower_Wall_Trap; - - public static WeaponType Hellfire_Missile_Pack_Floor_Trap; - - public static WeaponType Yamato_Gun; - - public static WeaponType Nuclear_Strike; - - public static WeaponType Lockdown; - - public static WeaponType EMP_Shockwave; - - public static WeaponType Irradiate; - - public static WeaponType Parasite; - - public static WeaponType Spawn_Broodlings; - - public static WeaponType Ensnare; - - public static WeaponType Dark_Swarm; - - public static WeaponType Plague; - - public static WeaponType Consume; - - public static WeaponType Stasis_Field; - - public static WeaponType Psionic_Storm; - - public static WeaponType Disruption_Web; - - public static WeaponType Restoration; - - public static WeaponType Mind_Control; - - public static WeaponType Feedback; - - public static WeaponType Optical_Flare; - - public static WeaponType Maelstrom; - - public static WeaponType None; - - public static WeaponType Unknown; - - - private static Map instances = new HashMap(); - - private WeaponType(long pointer) { - this.pointer = pointer; - } - - private static WeaponType get(long pointer) { - if (pointer == 0 ) { - return null; - } - WeaponType instance = instances.get(pointer); - if (instance == null ) { - instance = new WeaponType(pointer); - instances.put(pointer, instance); - } - return instance; - } - - private long pointer; - - private native String toString_native(long pointer); - - private native TechType getTech_native(long pointer); - - private native UnitType whatUses_native(long pointer); - - private native int damageAmount_native(long pointer); - - private native int damageBonus_native(long pointer); - - private native int damageCooldown_native(long pointer); - - private native int damageFactor_native(long pointer); - - private native UpgradeType upgradeType_native(long pointer); - - private native DamageType damageType_native(long pointer); - - private native ExplosionType explosionType_native(long pointer); - - private native int minRange_native(long pointer); - - private native int maxRange_native(long pointer); - - private native int innerSplashRadius_native(long pointer); - - private native int medianSplashRadius_native(long pointer); - - private native int outerSplashRadius_native(long pointer); - - private native boolean targetsAir_native(long pointer); - - private native boolean targetsGround_native(long pointer); - - private native boolean targetsMechanical_native(long pointer); - - private native boolean targetsOrganic_native(long pointer); - - private native boolean targetsNonBuilding_native(long pointer); - - private native boolean targetsNonRobotic_native(long pointer); - - private native boolean targetsTerrain_native(long pointer); - - private native boolean targetsOrgOrMech_native(long pointer); - - private native boolean targetsOwn_native(long pointer); - - -}