soc.game
Class SOCCity

java.lang.Object
  extended by soc.game.SOCPlayingPiece
      extended by soc.game.SOCCity
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class SOCCity
extends SOCPlayingPiece

A city playing piece

See Also:
Serialized Form

Field Summary
 
Fields inherited from class soc.game.SOCPlayingPiece
board, CITY, coord, FORTRESS, MAXPLUSONE, MIN, pieceType, player, ROAD, SETTLEMENT, SHIP, specialVP, specialVPEvent, VILLAGE
 
Constructor Summary
SOCCity(SOCPlayer pl, int co, SOCBoard board)
          Make a new city
 
Method Summary
 java.util.Vector<java.lang.Integer> getAdjacentHexes()
           
 
Methods inherited from class soc.game.SOCPlayingPiece
equals, getAdjacentEdges, getCoordinates, getPlayer, getPlayerNumber, getResourcesToBuild, getType, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SOCCity

public SOCCity(SOCPlayer pl,
               int co,
               SOCBoard board)
        throws java.lang.IllegalArgumentException
Make a new city

Parameters:
pl - player who owns the city
co - coordinates
board - board if known; otherwise will extract from pl
Throws:
java.lang.IllegalArgumentException - if pl null, or board null and pl.board also null
Method Detail

getAdjacentHexes

public java.util.Vector<java.lang.Integer> getAdjacentHexes()
Returns:
the hexes touching this city, same format as SOCBoard.getAdjacentHexesToNode(int)