fix to previous one

This commit is contained in:
Maxmtg
2013-05-12 04:35:56 +00:00
parent 44924a0c88
commit c3ffd8f0d6
3 changed files with 2 additions and 6 deletions

View File

@@ -29,8 +29,6 @@ import forge.game.ai.AiController;
* @version $Id$
*/
public class AIPlayer extends Player {
private final PlayerControllerAi controller;
/**
* <p>
* Constructor for AIPlayer.
@@ -46,7 +44,7 @@ public class AIPlayer extends Player {
}
public AiController getAi() {
return controller.getAi();
return controller instanceof PlayerControllerAi ? ((PlayerControllerAi) controller).getAi() : null;
}
} // end AIPlayer class

View File

@@ -39,8 +39,6 @@ import forge.game.GameActionUtil;
import forge.game.GameState;
public class HumanPlayer extends Player {
private final PlayerControllerHuman controller;
public HumanPlayer(final LobbyPlayerHuman player, GameState game) {
super(player, game);
controller = new PlayerControllerHuman(game, this);

View File

@@ -158,7 +158,7 @@ public class Player extends GameEntity implements Comparable<Player> {
private Card currentPlane = null;
private PlayerStatistics stats = new PlayerStatistics();
private PlayerController controller;
protected PlayerController controller;
private final LobbyPlayer lobbyPlayer;
private final List<Card> schemeDeck = new ArrayList<Card>();