rules
Class King

java.lang.Object
  extended by core.Piece
      extended by rules.King

public class King
extends Piece

King piece


Field Summary
 
Fields inherited from class core.Piece
color
 
Constructor Summary
King(Color color, int lastMove)
           
 
Method Summary
protected  String getName()
           
 int hashCode()
          This should be unique for different pieces or different colors.
 Collection<Move> moveCandidates(GameState g, Position here)
           
 String pieceString()
           
static boolean threatens(GameState g, Color color, Position pos)
           
 
Methods inherited from class core.Piece
getColor, getLastMove, postMove, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

King

public King(Color color,
            int lastMove)
See Also:
Piece
Method Detail

getName

protected String getName()
Specified by:
getName in class Piece
See Also:
Piece

moveCandidates

public Collection<Move> moveCandidates(GameState g,
                                       Position here)
Specified by:
moveCandidates in class Piece
See Also:
Piece

pieceString

public String pieceString()
Specified by:
pieceString in class Piece
See Also:
Piece

threatens

public static boolean threatens(GameState g,
                                Color color,
                                Position pos)

hashCode

public int hashCode()
Description copied from class: Piece
This should be unique for different pieces or different colors.

Specified by:
hashCode in class Piece