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

Quick Search    Search Deep

antichess
Class Knight  view Knight download Knight.java

java.lang.Object
  extended byantichess.Piece
      extended byantichess.Knight

public class Knight
extends Piece

This class contains the rules that apply to Knight.


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
Knight(char letter, Board b, int col, int row, int color)
          Creates a new piece.
 
Method Summary
 Piece copyPiece(Board b)
          Creates a copy to a new board
 
Methods inherited from class antichess.Piece
addEmpty, canAttackLocation, 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

Knight

public Knight(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