Skip to content

Commit d8a66dc

Browse files
committed
force could potentially also change?
1 parent 8f7d980 commit d8a66dc

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/main/java/bwapi/Player.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ public class Player implements Comparable<Player> {
2424
private final int id;
2525
private final String name;
2626
private final PlayerType playerType;
27-
private final Force force;
2827
private final TilePosition startLocation;
2928

3029
private PlayerSelf self = null;
@@ -41,7 +40,6 @@ PlayerSelf self() {
4140
this.id = id;
4241
this.name = playerData.getName();
4342
this.playerType = PlayerType.idToEnum[playerData.getType()];
44-
this.force = game.getForce(playerData.getForce());
4543
this.startLocation = new TilePosition(playerData.getStartLocationX(), playerData.getStartLocationY());
4644
}
4745

@@ -108,7 +106,7 @@ public PlayerType getType() {
108106
* @return The {@link Force} object that the player is part of.
109107
*/
110108
public Force getForce() {
111-
return force;
109+
return game.getForce(playerData.getForce());
112110
}
113111

114112
/**

0 commit comments

Comments
 (0)