Skip to content

Commit 8b84fed

Browse files
committed
fixes
1 parent a898945 commit 8b84fed

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/main/java/bwapi/Player.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public List<Unit> getUnits() {
8181

8282
/**
8383
* Retrieves the race of the player. This allows you to change strategies
84-
* against different races, or generalize some commands for yourself().
84+
* against different races, or generalize some commands for yourself.
8585
*
8686
* @return The Race that the player is using.
8787
* Returns {@link Race#Unknown} if the player chose {@link Race#Random} when the game started and they

src/main/java/bwapi/Unit.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public class Unit implements Comparable<Unit> {
6464
private UnitSelf self = null;
6565
UnitSelf self() {
6666
if (self == null) {
67-
self= new UnitSelf();
67+
self = new UnitSelf();
6868
}
6969
return self;
7070
}
@@ -4294,13 +4294,13 @@ public boolean canUpgrade(UpgradeType type, boolean checkCanIssueCommandType) {
42944294
return false;
42954295
}
42964296

4297-
if (self.hasUnitTypeRequirement(type.whatUpgrades())) {
4297+
if (!self.hasUnitTypeRequirement(type.whatUpgrades())) {
42984298
return false;
42994299
}
43004300

43014301
final int nextLvl = self.getUpgradeLevel(type) + 1;
43024302

4303-
if (self.hasUnitTypeRequirement(type.whatsRequired(nextLvl))) {
4303+
if (!self.hasUnitTypeRequirement(type.whatsRequired(nextLvl))) {
43044304
return false;
43054305
}
43064306

0 commit comments

Comments
 (0)