com.editev.chess
Class EnumeratedGame

java.lang.Object
  |
  +--com.editev.chess.Chess
        |
        +--com.editev.chess.Board
              |
              +--com.editev.chess.GameState
                    |
                    +--com.editev.chess.Game
                          |
                          +--com.editev.chess.EnumeratedGame
Direct Known Subclasses:
GameMoves

public class EnumeratedGame
extends Game

A Game that can enumerate its legal Moves.

See Also:
the source here.

Inner Class Summary
(package private)  class EnumeratedGame.AcceptLegalMoves
          A class only accept legal moves.
(package private)  class EnumeratedGame.AcceptSquaresOnTheMove
          Only accepts Squares containing pieces that are on-the-move.
 class EnumeratedGame.AllMovesForPieceMoving
          An enumeration of all Moves for the piece in the Move.
(package private)  class EnumeratedGame.ConstructMovesFromPieces
          Constructs a list of Piece moves from a Square.
 class EnumeratedGame.SquareToPiece
          A Function that converts a Square to the Piece on that Square.
 
Inner classes inherited from class com.editev.chess.Chess
Chess.Black, Chess.White
 
Field Summary
(package private)  com.editev.util.Filter acceptLegalMoves
          A Filter that only accepts legal moves for this Game.
(package private)  com.editev.util.Filter acceptSquaresOnTheMove
          A filter that only accepts Locations with pieces that are on-the-move for this game.
(package private)  com.editev.util.Function constructMovesFromPieces
          A Function that constructs a list of Piece moves from a Square in this Game.
 
Fields inherited from class com.editev.chess.Game
history, isStalemate, move
 
Fields inherited from class com.editev.chess.GameState
epColumn, kingMoved, moves, NO_EP_COLUMN, reversibleMoves, rookMoved
 
Fields inherited from class com.editev.chess.Board
PIECE_NAMES, PIECES, squares
 
Fields inherited from class com.editev.chess.Chess
BLACK, NO_MOVE, NO_PIECE, WHITE
 
Constructor Summary
EnumeratedGame()
           
 
Method Summary
 java.util.Enumeration enumerateAllLegalMoves()
          Enumeration of every legal move for this Game.
 
Methods inherited from class com.editev.chess.Game
applyMove, isIllegal, isStalemate, thirdTime
 
Methods inherited from class com.editev.chess.GameState
canBeCaptured, canMove, clearEP, getEP, getMoves, getReversibleMoves, incrementMoves, irreversibleMove, isWhiteMove, kingMoved, moveKing, moveRook, rookMoved, setEP
 
Methods inherited from class com.editev.chess.Board
clone, cloneBoard, copyFrom, equals, findPieceSquare, getPiece, getPiece, getPieceIndex, getPieceIndex, hasPiece, inCheck, isAttacked, resultsInCheck, setPieceIndex, toString
 
Methods inherited from class com.editev.chess.Chess
notColor, toColor, toColor, toColorName
 
Methods inherited from class java.lang.Object
, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

constructMovesFromPieces

com.editev.util.Function constructMovesFromPieces
A Function that constructs a list of Piece moves from a Square in this Game.

acceptLegalMoves

com.editev.util.Filter acceptLegalMoves
A Filter that only accepts legal moves for this Game.

acceptSquaresOnTheMove

com.editev.util.Filter acceptSquaresOnTheMove
A filter that only accepts Locations with pieces that are on-the-move for this game.
Constructor Detail

EnumeratedGame

public EnumeratedGame()
Method Detail

enumerateAllLegalMoves

public java.util.Enumeration enumerateAllLegalMoves()
Enumeration of every legal move for this Game. Don't change the game in the middle of getting the enumeration or this might not work.
Returns:
a new Enumeration of all legal moves for this game.