Package chessapi4j
Class AdvanceUtil
java.lang.Object
chessapi4j.AdvanceUtil
Low-level utilities that are not entirely safe but very fast.
- Since:
- 1.2.0
- Author:
- lunalobos
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
fiftyMoves
(Position position) Returns1
if the position can be a draw due to the 50-move rule,0
otherwise.static int
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 Details
-
isInCheck
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
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
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.
-