rules
Class Pawn

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

public class Pawn
extends Piece

Pawn piece.


Field Summary
 
Fields inherited from class core.Piece
color
 
Constructor Summary
Pawn(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

Pawn

public Pawn(Color color,
            int lastMove)
Method Detail

getName

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

pieceString

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

moveCandidates

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

threatens

public static boolean threatens(GameState g,
                                Color color,
                                Position pos)
See Also:
Piece

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