Skip to content

A header-only library to validate FEN strings (Forsyth-Edwards Notation) of a chess state, and also checks if a move is valid (long algebric notation, i.e. "e2e4")

Notifications You must be signed in to change notification settings

rilpires/chess_fen_validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

See demo.cpp, it is really straightforward:

  • You construct a TableState object from a fen string using get_table_state.
  • If it was valid (check value returned), you can call some functions like:
    • is_king_in_check
    • is_checkmate
    • get_draw_reason
      • Returns enum of draw reason.
    • is_move_invalid
      • Returns enum of invalid reason.
    • apply_move(TableState*,const char*)
      • Returns a new table state. Check beforehand if move is valid, unexpected behavior if not!

About

A header-only library to validate FEN strings (Forsyth-Edwards Notation) of a chess state, and also checks if a move is valid (long algebric notation, i.e. "e2e4")

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages