|
|||||||||
| Home >> All >> [ antichess overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
antichess
Class Pawn

java.lang.Objectantichess.Piece
antichess.Pawn
- public class Pawn
- extends Piece
A Pawn piece in antichess.
| 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 | |
Pawn(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 |
private java.util.List |
getCaptureMoves()
Returns a list of possible capture (not necessarily legal) moves for a Pawn The Moves are not necessarily legal. |
private java.util.List |
getNonCaptureMoves()
Returns a list of possible noncapture (not necessarily legal) moves for a Pawn The Moves are not necessarily legal. |
void |
getNormalMoves(java.util.List captureMoves,
java.util.List nonCaptureMoves)
Overrides Piece.getNormalMoves |
void |
makeCaptureMove(Move move)
Makes a capture move & checks if it is also a promotion. |
private void |
makeEpMove(Move move)
Makes an en passant capture |
void |
makeOtherMove(Move move)
Overrides Piece.makeOtherMove. |
private void |
makePromoteMove(Move move)
Makes a noncapture promotion |
void |
undoCaptureMove(Move move)
undos a normal pawn capture move /* * Overrides Piece.undoCaptureMove. |
private void |
undoEpMove(Move move)
Undos en passant Move |
void |
undoOtherMove(Move move)
Overrides Piece.undoOtherMove |
| Methods inherited from class antichess.Piece |
addEmpty, canAttackLocation, equals, equals, getAllValidMoves, getBoard, getChar, getCol, getColor, getLastCol, getLastRow, getMoved, getOpponentColor, getOpponentColor, getOtherMoves, getRow, getStandardValidMoves, getSwitchMoves, getType, getValidMoves, getValidMovesNormalChess, isGameOver, isGameOver, isGameOverNormalChess, isLoseNormalChess, isTie, isTie, isTieNormalChess, isValidMove, isWin, isWin, kingInCheck, makeGeneratedMove, makeGeneratedMove, makeMove, makeMove, makeMove, makeMove, setBoard, setColor, setLastLocation, setLocation, setMoved, swapPieces, toString, undoMove |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
Pawn
public Pawn(char letter,
Board b,
int col,
int row,
int color)
- Creates a new piece.
| Method Detail |
copyPiece
public Piece copyPiece(Board b)
getNormalMoves
public void getNormalMoves(java.util.List captureMoves, java.util.List nonCaptureMoves)
- Overrides Piece.getNormalMoves
- Overrides:
getNormalMovesin classPiece
getNonCaptureMoves
private java.util.List getNonCaptureMoves()
- Returns a list of possible noncapture (not necessarily legal) moves for a Pawn
The Moves are not necessarily legal.
Calling code should use inCheck after making a move.
getCaptureMoves
private java.util.List getCaptureMoves()
- Returns a list of possible capture (not necessarily legal) moves for a Pawn
The Moves are not necessarily legal.
Calling code should use inCheck after making a move.
makeOtherMove
public void makeOtherMove(Move move)
- Overrides Piece.makeOtherMove. Implements 2-step pass or En Passant or Promotion
- Overrides:
makeOtherMovein classPiece
undoOtherMove
public void undoOtherMove(Move move)
- Overrides Piece.undoOtherMove
- Overrides:
undoOtherMovein classPiece
makeEpMove
private void makeEpMove(Move move)
- Makes an en passant capture
undoEpMove
private void undoEpMove(Move move)
- Undos en passant Move
makePromoteMove
private void makePromoteMove(Move move)
- Makes a noncapture promotion
makeCaptureMove
public void makeCaptureMove(Move move)
- Makes a capture move & checks if it is also a promotion.
Overrides Piece.makeCaptureMove
- Overrides:
makeCaptureMovein classPiece
undoCaptureMove
public void undoCaptureMove(Move move)
- undos a normal pawn capture move
/* * Overrides Piece.undoCaptureMove.
- Overrides:
undoCaptureMovein classPiece
|
|||||||||
| Home >> All >> [ antichess overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC