Erl_chess_board - a minimal chess board library for Erlang

erl_chess_board

A minimal chess board library for Erlang with move legality validation and check detection.

Features

  • Parse and generate FEN (Forsyth-Edwards Notation) strings

  • Validate move legality according to chess rules

  • Handle special moves like castling, en passant, and pawn promotion

  • Detect check and prevent moves that would leave the king in check

  • Detect checkmate and stalemate conditions

  • Interactive terminal chess game with algebraic notation support

  • Comprehensive test suite with 48 test cases

8 Likes

@etnt nice, how about this one:

1 Like

Cool! I’ve missed that one :slight_smile:

–T.

It the most beautiful chess UI in terminal i ever see! How about adding UCI support which makes it more practical to play with engine, such as stockfish ?

Hehe, well it I thought I should leave that as en exercise for some other avid chess player :wink:

I borrowed terminal colors from your code and wrote a Nim program to play against Stockfish mychess.nim. I played a few games of chess with stockfish in Termux, and I lost all of them :slight_smile:

1 Like