Package mage.view

Examples of mage.view.PlayerView


        if (playerId.equals(player.getPlayerId()))
          break;
        playerSeat++;
      }
    }
    PlayerView player = game.getPlayers().get(playerSeat);
    PlayAreaPanel sessionPlayer = new PlayAreaPanel(player, bigCard, gameId);
    players.put(player.getPlayerId(), sessionPlayer);
    GridBagConstraints c = new GridBagConstraints();
    c.fill = GridBagConstraints.BOTH;
    c.weightx = 0.5;
    c.weighty = 0.5;
    if (oddNumber)
      c.gridwidth = 2;
    c.gridx = col;
    c.gridy = row;
    this.pnlBattlefield.add(sessionPlayer, c);
    sessionPlayer.setVisible(true);
    if (oddNumber)
      col++;
    int playerNum = playerSeat + 1;
    if (playerNum >= numSeats)
      playerNum = 0;
    while (true) {
      if (row == 1)
        col++;
      else
        col--;
      if (col >= numColumns) {
        row = 0;
        col = numColumns - 1;
      }
      player = game.getPlayers().get(playerNum);
      PlayAreaPanel playerPanel = new PlayAreaPanel(player, bigCard, gameId);
      players.put(player.getPlayerId(), playerPanel);
      c = new GridBagConstraints();
      c.fill = GridBagConstraints.BOTH;
      c.weightx = 0.5;
      c.weighty = 0.5;
      c.gridx = col;
View Full Code Here


                    break;
                }
                playerSeat++;
            }
        }
        PlayerView player = game.getPlayers().get(playerSeat);
        PlayAreaPanel sessionPlayer = new PlayAreaPanel(player, bigCard, gameId, true, game.getPriorityTime(), game.isPlayer(), this);
        players.put(player.getPlayerId(), sessionPlayer);
        GridBagConstraints c = new GridBagConstraints();
        c.fill = GridBagConstraints.BOTH;
        c.weightx = 0.5;
        c.weighty = 0.5;
        if (oddNumber) {
            c.gridwidth = 2;
        }
        c.gridx = col;
        c.gridy = row;
        this.pnlBattlefield.add(sessionPlayer, c);
        sessionPlayer.setVisible(true);
        if (oddNumber) {
            col++;
        }
        int playerNum = playerSeat + 1;
        if (playerNum >= numSeats) {
            playerNum = 0;
        }
        while (true) {
            if (row == 1) {
                col++;
            }
            else {
                col--;
            }
            if (col >= numColumns) {
                row = 0;
                col = numColumns - 1;
            }
            player = game.getPlayers().get(playerNum);
            PlayAreaPanel playerPanel = new PlayAreaPanel(player, bigCard, gameId, false, game.getPriorityTime(), game.isPlayer(), this);
            players.put(player.getPlayerId(), playerPanel);
            c = new GridBagConstraints();
            c.fill = GridBagConstraints.BOTH;
            c.weightx = 0.5;
            c.weighty = 0.5;
            c.gridx = col;
View Full Code Here

                    target.translate(-parentPoint.x, -parentPoint.y);
                    ArrowBuilder.getBuilder().addArrow(data.gameId, (int) me.getX() + 35, (int) me.getY(), (int) target.getX() + 40, (int) target.getY() + 10, Color.red, ArrowBuilder.Type.TARGET);
                    continue;
                }

                PlayerView view = panel.getPlayerPanel().getPlayer();
                if (view != null) {
                    CardsView graveyard = view.getGraveyard();
                    if (graveyard.containsKey(uuid)) {
                        p = MageFrame.getGame(data.gameId).getPlayers().get(view.getPlayerId());
                        if (p != null) {
                            Point target = p.getLocationOnScreen();
                            target.translate(-parentPoint.x, -parentPoint.y);
                            int yOffset = p.isSmallMode() ? (PlayAreaPanel.PANEL_HEIGHT - PlayAreaPanel.PANEL_HEIGHT_SMALL) : 0;
                            ArrowBuilder.getBuilder().addArrow(data.gameId, (int) me.getX() + 35, (int) me.getY(), (int) target.getX() + 15, (int) target.getY() + 145 - yOffset, Color.red, ArrowBuilder.Type.TARGET);
View Full Code Here

TOP

Related Classes of mage.view.PlayerView

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.