public int getStartingPos(boolean inheritFromOwner) { if (inheritFromOwner && startingPos == Board.START_NONE) { return owner.getStartingPos(); } return startingPos; }
public void update() { ((DefaultListModel<String>) lisStartList.getModel()).removeAllElements(); for (Enumeration<IPlayer> i = client.getPlayers(); i.hasMoreElements();) { IPlayer player = i.nextElement(); if (player != null) { StringBuffer ssb = new StringBuffer(); ssb.append(player.getName()).append(" : "); //$NON-NLS-1$ ssb.append(IStartingPositions.START_LOCATION_NAMES[player .getStartingPos()]); ((DefaultListModel<String>) lisStartList.getModel()).addElement(ssb .toString()); } } }
public String legalDeploymentZone() { int width = getClient().getBoard().getWidth(); int height = getClient().getBoard().getHeight(); int nDir = getClient().getLocalPlayer().getStartingPos(); int minx = 0; int maxx = width;
return player.getName(); } else if (col == COL_START) { return IStartingPositions.START_LOCATION_NAMES[player.getStartingPos()]; } else if (col == COL_TON) { double ton = tons.get(row);
.hasMoreElements();) { IPlayer player = e.nextElement(); if (player.getStartingPos() == 0) { continue; if (((player.getStartingPos() == 9) && (i == 10)) || ((player.getStartingPos() == 10) && (i == 9))) { continue; if (((player.getStartingPos() == i) || ((player.getStartingPos() + 1) == i) || ((player .getStartingPos() - 1) == i)) && (player.getId() != client.getLocalPlayer() .getId())) {
if (board.isLegalDeployment(c, cp.getStartingPos())) { Color bC = new Color(PlayerColors.getColorRGB(cp.getColorIndex())); drawHexBorder(g, getHexLocation(c), bC, (bThickness+2)
int i = client.getLocalPlayer().getStartingPos(); if (i == 0) { clientgui.doAlertDialog(Messages.getString("ChatLounge.ExclusiveDeploy.title"), //$NON-NLS-1$ if (player.getStartingPos() == 0) { continue; if (((player.getStartingPos() == 9) && (i == 10)) || ((player.getStartingPos() == 10) && (i == 9))) { continue; if (((player.getStartingPos() == i) || ((player.getStartingPos() + 1) == i) || ((player.getStartingPos() - 1) == i)) && (player.getId() != client.getLocalPlayer().getId())) { clientgui.doAlertDialog(Messages.getString("ChatLounge.OverlapDeploy.title"), //$NON-NLS-1$
if (game.getBoard().isLegalDeployment(mcoords, cp.getStartingPos())) { if (!foundPlayer) { foundPlayer = true;
} else { // if we can't get the deploy zone from the dir = m_client.getLocalPlayer().getStartingPos();