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 ?
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