Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

antichess
Class Rook  view Rook download Rook.java

java.lang.Object
  extended byantichess.Piece
      extended byantichess.Rook

public class Rook
extends Piece

This class contains the rules that apply to Rook.


Field Summary
 
Fields inherited from class antichess.Piece
BISHOP, BLACK, BLUE, dcol, drow, EMPTY, FIRSTCOLOR, FIRSTPIECE, KING, KNIGHT, LASTCOLOR, LASTPIECE, offsets, PAWN, PIECECOUNT, PIECEVALUE, playerColorString, QUEEN, RED, ROOK, slide, WHITE
 
Constructor Summary
Rook(char letter, Board b, int col, int row, int color)
          Creates a new piece.
 
Method Summary
 boolean canAttackLocation(int targetCol, int targetRow)
          overrides Piece.canAttackLocation
 Piece copyPiece(Board b)
          Creates a copy to a new board
 
Methods inherited from class antichess.Piece
addEmpty, equals, equals, getAllValidMoves, getBoard, getChar, getCol, getColor, getLastCol, getLastRow, getMoved, getNormalMoves, getOpponentColor, getOpponentColor, getOtherMoves, getRow, getStandardValidMoves, getSwitchMoves, getType, getValidMoves, getValidMovesNormalChess, isGameOver, isGameOver, isGameOverNormalChess, isLoseNormalChess, isTie, isTie, isTieNormalChess, isValidMove, isWin, isWin, kingInCheck, makeCaptureMove, makeGeneratedMove, makeGeneratedMove, makeMove, makeMove, makeMove, makeMove, makeOtherMove, setBoard, setColor, setLastLocation, setLocation, setMoved, swapPieces, toString, undoCaptureMove, undoMove, undoOtherMove
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Rook

public Rook(char letter,
            Board b,
            int col,
            int row,
            int color)
Creates a new piece.

Method Detail

copyPiece

public Piece copyPiece(Board b)
Creates a copy to a new board

Overrides:
copyPiece in class Piece

canAttackLocation

public boolean canAttackLocation(int targetCol,
                                 int targetRow)
overrides Piece.canAttackLocation

Overrides:
canAttackLocation in class Piece