File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -23,9 +23,7 @@ public class Player implements Comparable<Player> {
2323 private final Game game ;
2424 private final int id ;
2525 private final String name ;
26- private final Race race ;
2726 private final PlayerType playerType ;
28- private final Force force ;
2927 private final TilePosition startLocation ;
3028
3129 private PlayerSelf self = null ;
@@ -41,9 +39,7 @@ PlayerSelf self() {
4139 this .game = game ;
4240 this .id = id ;
4341 this .name = playerData .getName ();
44- this .race = Race .idToEnum [playerData .getRace ()];
4542 this .playerType = PlayerType .idToEnum [playerData .getType ()];
46- this .force = game .getForce (playerData .getForce ());
4743 this .startLocation = new TilePosition (playerData .getStartLocationX (), playerData .getStartLocationY ());
4844 }
4945
@@ -88,7 +84,7 @@ public List<Unit> getUnits() {
8884 * have not been seen.
8985 */
9086 public Race getRace () {
91- return race ;
87+ return Race . idToEnum [ playerData . getRace ()] ;
9288 }
9389
9490 /**
@@ -110,7 +106,7 @@ public PlayerType getType() {
110106 * @return The {@link Force} object that the player is part of.
111107 */
112108 public Force getForce () {
113- return force ;
109+ return game . getForce ( playerData . getForce ()) ;
114110 }
115111
116112 /**
You can’t perform that action at this time.
0 commit comments