Class MinChess

java.lang.Object
net.chesstango.gardel.minchess.MinChess
All Implemented Interfaces:
Cloneable

public class MinChess extends Object implements Cloneable
Author:
Mauricio Coria
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    MinChess(boolean whiteTurn, boolean castlingBlackKingAllowed, boolean castlingBlackQueenAllowed, boolean castlingWhiteKingAllowed, boolean castlingWhiteQueenAllowed, long enPassantSquare, long whitePositions, long blackPositions, long kingPositions, long queenPositions, long rookPositions, long bishopPositions, long knightPositions, long pawnPositions)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    void
    doMove(short move)
     
    static MinChess
    from(FEN fen)
     
    static int
    fromFile(short move)
     
    static int
    fromIdx(short move)
     
    static int
    fromRank(short move)
     
    int
    generateMoves(short[] moves)
     
    int
    getFromPiece(short move)
     
    int
    getPiece(int file, int rank)
     
    int
    getPiece(long position)
     
    static int
    getPromotionPiece(short move)
     
    int
    getToPiece(short move)
     
    boolean
     
     
    static int
    toFile(short move)
     
    static int
    toIdx(short move)
     
    static int
    toRank(short move)
     

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • MinChess

      public MinChess(boolean whiteTurn, boolean castlingBlackKingAllowed, boolean castlingBlackQueenAllowed, boolean castlingWhiteKingAllowed, boolean castlingWhiteQueenAllowed, long enPassantSquare, long whitePositions, long blackPositions, long kingPositions, long queenPositions, long rookPositions, long bishopPositions, long knightPositions, long pawnPositions)
  • Method Details

    • generateMoves

      public int generateMoves(short[] moves)
    • doMove

      public void doMove(short move)
    • fromIdx

      public static int fromIdx(short move)
    • fromFile

      public static int fromFile(short move)
    • fromRank

      public static int fromRank(short move)
    • toIdx

      public static int toIdx(short move)
    • toFile

      public static int toFile(short move)
    • toRank

      public static int toRank(short move)
    • getPromotionPiece

      public static int getPromotionPiece(short move)
    • getFromPiece

      public int getFromPiece(short move)
    • getToPiece

      public int getToPiece(short move)
    • getPiece

      public int getPiece(int file, int rank)
    • getPiece

      public int getPiece(long position)
    • clone

      public MinChess clone()
      Overrides:
      clone in class Object
    • getTurn

      public boolean getTurn()
    • from

      public static MinChess from(FEN fen)
    • toFEN

      public FEN toFEN()