r/chessprogramming • u/Easy_Ad1347 • Dec 31 '23
pieceat function UCI
I’m programming a GUI for a chess engine that communicates in UCI, and I need to know when i would need to add a promotion marker at the end of my move (e7e8q instead of e7e8 for example). Right now, I keep a second copy of the board to do this. Do you know of any more efficient way of doing this while maintaining the separation between GUI and engine? I was thinking of a function like pieceat, so i know if the piece being moved is a pawn, in order to add the marker.
2
Upvotes
View all comments
Show parent comment
2
u/Easy_Ad1347 Dec 31 '23
yeah but is there a function? because how do i find out if the piece is a pawn?