Skip to content

Commit e2c74d9

Browse files
committed
Fix some enums documentation
1 parent 9a550b4 commit e2c74d9

24 files changed

+230
-28
lines changed

src/main/java/bwapi/BulletType.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
import java.util.Arrays;
44

55
/**
6-
* Enum containing bullet types.
6+
* This enum represents a type of bullet.
7+
*
8+
* Internally, these are the same IDs as flingy types in Broodwar.
79
*/
810
public enum BulletType {
911
Melee(0),

src/main/java/bwapi/Color.java

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,53 @@
1010
* limited to this palette.
1111
*/
1212
public class Color {
13+
/**
14+
* The default color for Player 1.
15+
*/
1316
public final static Color Red = new Color(111);
17+
/**
18+
* The default color for Player 2.
19+
*/
1420
public final static Color Blue = new Color(165);
21+
/**
22+
* The default color for Player 3.
23+
*/
1524
public final static Color Teal = new Color(159);
25+
/**
26+
* The default color for Player 4.
27+
*/
1628
public final static Color Purple = new Color(164);
29+
/**
30+
* The default color for Player 5.
31+
*/
1732
public final static Color Orange = new Color(156);
33+
/**
34+
* The default color for Player 6.
35+
*/
1836
public final static Color Brown = new Color(19);
37+
/**
38+
* A bright white. Note that this is lighter than Player 7's white.
39+
*/
1940
public final static Color White = new Color(255);
41+
/**
42+
* The default color for Player 8.
43+
*/
2044
public final static Color Yellow = new Color(135);
45+
/**
46+
* The alternate color for Player 7 on Ice tilesets.
47+
*/
2148
public final static Color Green = new Color(117);
49+
/**
50+
* The default color for Neutral (Player 12).
51+
*/
2252
public final static Color Cyan = new Color(128);
53+
/**
54+
* The color black.
55+
*/
2356
public final static Color Black = new Color(0);
57+
/**
58+
* The color grey.
59+
*/
2460
public final static Color Grey = new Color(74);
2561

2662
private static final RGBQUAD RGBRESERVE = new RGBQUAD(0, 0, 0, 0xFF);

src/main/java/bwapi/CommandType.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
import java.util.Arrays;
44

5+
/**
6+
* Used in {@link UnitCommand}.
7+
*/
58
public enum CommandType {
69
None(0),
710
SetScreenPosition(1),

src/main/java/bwapi/CoordinateType.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,24 @@
33
import java.util.Arrays;
44

55
/**
6-
* Contains the coordinate type enumeration for relative drawing positions.
6+
* The coordinate type enumeration for relative drawing positions.
77
*/
88
public enum CoordinateType {
9+
/**
10+
* A default value for uninitialized coordinate types.
11+
*/
912
None(0),
13+
/**
14+
* {@link Position#Origin} (0,0) corresponds to the top left corner of the <b>screen</b>
15+
*/
1016
Screen(1),
17+
/**
18+
* {@link Position#Origin} (0,0) corresponds to the top left corner of the <b>map</b>
19+
*/
1120
Map(2),
21+
/**
22+
* {@link Position#Origin} (0,0) corresponds to the top left corner of the <b>mouse cursor</b>
23+
*/
1224
Mouse(3);
1325

1426
static final CoordinateType[] idToEnum = new CoordinateType[4];

src/main/java/bwapi/DamageType.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
package bwapi;
22

33
/**
4-
* Enum containing damage types.
4+
* Damage types are used in Broodwar to determine the amount of damage that will be
5+
* done to a unit.
6+
*
7+
* This corresponds with UnitSizeType to determine the damage done to
8+
* a unit.
9+
*
10+
* @see {@link WeaponType}, {@link DamageType}, {@link UnitSizeType}
511
*
612
* [View on Liquipedia](http://wiki.teamliquid.net/starcraft/Damage_Type)<br>
713
* [View on Starcraft Campendium (Official Website)](http://classic.battle.net/scc/gs/damage.shtml)<br>

src/main/java/bwapi/EventType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import java.util.Arrays;
44

55
/**
6-
* Enum of event types supported by BWAPI.
6+
* Enumeration of callback event types.
77
*/
88
public enum EventType {
99
MatchStart(0),

src/main/java/bwapi/ExplosionType.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
package bwapi;
22

33
/**
4-
* Enum containing explosion types.
4+
* A representation of a weapon's explosion type.
5+
*
6+
* This indicates how the weapon behaves, such as if it deals splash damage or causes an effect to occur.
57
*/
68
public enum ExplosionType {
79
None(0),

src/main/java/bwapi/Flag.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@
55
* @see {@link Game#enableFlag}, {@link Game#isFlagEnabled}
66
*/
77
public enum Flag {
8+
/**
9+
* Enable to get information about all units on the map, not just the visible units.
10+
*/
811
CompleteMapInformation(0),
12+
/**
13+
* Enable to get information from the user (what units are selected, chat messages the user enters, etc)
14+
*/
915
UserInput(1);
1016

1117
final int id;

src/main/java/bwapi/GameType.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
import java.util.Arrays;
44

55
/**
6-
* Namespace containing game types.
7-
* @see GameType
6+
* An enum that represents game types in Broodwar.
7+
*
8+
* A game type is selected when creating a game.
89
*/
910
public enum GameType {
1011
None(0),

src/main/java/bwapi/Key.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
package bwapi;
22

3+
/**
4+
* An enumeration of keyboard input values.
5+
*
6+
* @see {@link Game#getKeyState}
7+
*/
38
public enum Key {
49
K_LBUTTON(1),
510
K_RBUTTON(2),

0 commit comments

Comments
 (0)