forked from External/mage
Fixed that to allow watchers of a game to see the hand cards of players did not work correctly.
This commit is contained in:
parent
c0db6dfdc8
commit
c65adebc57
14 changed files with 129 additions and 68 deletions
|
|
@ -70,8 +70,6 @@ public class GameSessionPlayer extends GameSessionWatcher {
|
|||
|
||||
private static final ExecutorService callExecutor = ThreadExecutor.getInstance().getCallExecutor();
|
||||
|
||||
private UserData userData;
|
||||
|
||||
public GameSessionPlayer(Game game, UUID userId, UUID playerId) {
|
||||
super(userId, game, true);
|
||||
this.playerId = playerId;
|
||||
|
|
@ -214,7 +212,6 @@ public class GameSessionPlayer extends GameSessionWatcher {
|
|||
@Override
|
||||
public GameView getGameView() {
|
||||
Player player = game.getPlayer(playerId);
|
||||
player.setUserData(this.userData);
|
||||
GameView gameView = new GameView(game.getState(), game, playerId, null);
|
||||
gameView.setHand(new CardsView(player.getHand().getCards(game)));
|
||||
if (gameView.getPriorityPlayerName().equals(player.getName())) {
|
||||
|
|
@ -298,7 +295,4 @@ public class GameSessionPlayer extends GameSessionWatcher {
|
|||
}
|
||||
}
|
||||
|
||||
public void setUserData(UserData userData) {
|
||||
this.userData = userData;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue