com.webstersmalley.chessweb.model.pieces
Class King

java.lang.Object
  extended by com.webstersmalley.chessweb.model.Piece
      extended by com.webstersmalley.chessweb.model.pieces.King

public class King
extends Piece

King class.

Author:
Matthew Smalley

Field Summary
static java.lang.String BLACK_STARTING_POSITIONS
          Black starting positions.
static java.lang.String WHITE_STARTING_POSITIONS
          White starting positions.
 
Fields inherited from class com.webstersmalley.chessweb.model.Piece
ALL_PIECES, BLACK_BISHOP, BLACK_KING, BLACK_KNIGHT, BLACK_PAWN, BLACK_QUEEN, BLACK_ROOK, WHITE_BISHOP, WHITE_KING, WHITE_KNIGHT, WHITE_PAWN, WHITE_QUEEN, WHITE_ROOK
 
Constructor Summary
King(Team team)
          Constructs the King.
 
Method Summary
 void validateDirection(Move move, Board board)
          Validates the direction.
 
Methods inherited from class com.webstersmalley.chessweb.model.Piece
getIcon, getName, getStartingPositions, getTeam, isJumper, moveIsATake, setJumper, setStartingPositions, setTeam, validateMove, validateTake
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WHITE_STARTING_POSITIONS

public static final java.lang.String WHITE_STARTING_POSITIONS
White starting positions. *

See Also:
Constant Field Values

BLACK_STARTING_POSITIONS

public static final java.lang.String BLACK_STARTING_POSITIONS
Black starting positions. *

See Also:
Constant Field Values
Constructor Detail

King

public King(Team team)
Constructs the King.

Parameters:
team - the team.
Method Detail

validateDirection

public final void validateDirection(Move move,
                                    Board board)
                             throws InvalidMoveException
Validates the direction.

Specified by:
validateDirection in class Piece
Parameters:
move - the move
board - the board
Throws:
InvalidMoveException - if the move is invalid.


Copyright © 2005 Webster Smalley. All Rights Reserved.