forked from External/mage
Test framework: added support to test client side data in unit tests (getGameView -> CardView, etc);
This commit is contained in:
parent
26fea5d07b
commit
fc0ff6c22d
7 changed files with 59 additions and 22 deletions
|
|
@ -99,11 +99,11 @@ public class GameSessionWatcher {
|
|||
|
||||
public GameView getGameView() {
|
||||
GameView gameView = new GameView(game.getState(), game, null, userId);
|
||||
processWatchedHands(userId, gameView);
|
||||
processWatchedHands(game, userId, gameView);
|
||||
return gameView;
|
||||
}
|
||||
|
||||
protected void processWatchedHands(UUID userId, GameView gameView) {
|
||||
protected static void processWatchedHands(Game game, UUID userId, GameView gameView) {
|
||||
Map<String, SimpleCardsView> handCards = new HashMap<>();
|
||||
for (Player player : game.getPlayers().values()) {
|
||||
if (player.hasUserPermissionToSeeHand(userId)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue