com.antelmann.game.chess
Class BoardPosition
java.lang.Object
com.antelmann.game.GameBoardPosition
com.antelmann.game.chess.BoardPosition
- All Implemented Interfaces:
- Serializable, Cloneable
public class BoardPosition
- extends GameBoardPosition
BoardPosition represents a position on a chess board.
This class is also used by other game packages and therefore public.
- Author:
- Holger Antelmann
- See Also:
- Serialized Form
BoardPosition
public BoardPosition(char file,
int rank)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
BoardPosition
public BoardPosition(int pos)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
getTileColor
public int getTileColor()
toString
public String toString()
- Overrides:
toString in class GameBoardPosition
getFile
public char getFile()
getRank
public int getRank()
getColumn
protected char getColumn()
getRow
protected int getRow()
validPosition
public static boolean validPosition(char file,
int rank)
validPosition
public static boolean validPosition(int pos)
relativePosition
public BoardPosition relativePosition(int fileAddition,
int rankAddition)
calculateIntPos
protected static int calculateIntPos(char file,
int rank)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
clone
public Object clone()
throws CloneNotSupportedException
- Overrides:
clone in class Object
- Throws:
CloneNotSupportedException
(c) 2001-2006 Holger Antelmann - all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads