Skip to content

Commit abb0e17

Browse files
committed
fix neutral isEnemy to return false
1 parent d7ed84e commit abb0e17

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Add JBWAPI as a dependecy
3535
<dependency>
3636
<groupId>com.github.JavaBWAPI</groupId>
3737
<artifactId>JBWAPI</artifactId>
38-
<version>0.4.1</version>
38+
<version>0.4.2</version>
3939
</dependency>
4040
```
4141

@@ -53,7 +53,7 @@ allprojects {
5353
Add JBWAPI as a dependecy
5454
```
5555
dependencies {
56-
implementation 'com.github.JavaBWAPI:JBWAPI:0.4.1'
56+
implementation 'com.github.JavaBWAPI:JBWAPI:0.4.2'
5757
}
5858
```
5959

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>jbwapi</groupId>
88
<artifactId>jbwapi</artifactId>
9-
<version>0.4.1</version>
9+
<version>0.4.2</version>
1010

1111
<properties>
1212
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

src/main/java/bwapi/Player.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,12 @@ public boolean isAlly(final Player player) {
6060
return playerData.isAlly(player.getID());
6161
}
6262

63-
//TODO FIX in 4.3.0
63+
//TODO FIX OBSERVERS in 4.3.0
6464
public boolean isEnemy(final Player player) {
65-
return !(player.isNeutral() || isAlly(player));
65+
if (player.isNeutral()) {
66+
return false;
67+
}
68+
return !isAlly(player);
6669
}
6770

6871
public boolean isNeutral() {

0 commit comments

Comments
 (0)