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 Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
fiftyMoves(Position position)
Returns1
if the position can be a draw due to the 50-move rule,0
otherwise.static int
isInCheck(Position position)
Returns1
if the position is in check,0
otherwise.static int
lackOfMaterial(Position position)
Returns1
if the position is in a draw due to insufficient material,0
otherwise.
-
-
-
Method Detail
-
isInCheck
public static int isInCheck(Position position)
Returns1
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)
Returns1
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)
Returns1
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.
-
-