Package chessapi4j

Class AdvanceUtil

java.lang.Object
chessapi4j.AdvanceUtil

public class AdvanceUtil extends Object
Low-level utilities that are not entirely safe but very fast.
Since:
1.2.0
Author:
lunalobos
  • Method Details

    • isInCheck

      public static int isInCheck(Position position)
      Returns 1 if the position is in check, 0 otherwise.
      Parameters:
      position - the position to look at
      Returns:
      1 if the position is in check, 0 otherwise.
    • lackOfMaterial

      public static int lackOfMaterial(Position position)
      Returns 1 if the position is in a draw due to insufficient material, 0 otherwise.
      Parameters:
      position - the position to look at
      Returns:
      1 if the position is in a draw due to insufficient material, 0 otherwise.
    • fiftyMoves

      public static int fiftyMoves(Position position)
      Returns 1 if the position can be a draw due to the 50-move rule, 0 otherwise.
      Parameters:
      position - the position to look at
      Returns:
      1 if the position can be a draw due to the 50-move rule, 0 otherwise.