in my internet chess apps (TCP and GMail versions), the player clicks an image of a chess piece that is inside a panel. The panels are named in normal alpha-numeric fashion..i.e. "a1", "b1", etc.. The images are all named "img" + the panel name, so an image in panel a1 is named imga1.
When an image is clicked my app fetches the panel name ("imga1" minus "img" := "a1"), the image tag number which corresponds to the index of that image in a TImageLlist. The TImage.List image index identifies the piece name and color. When the player clicks the target square, my app displays the 1st squares image in the second square, vacates the first square (actually displays a blank image), updates that square's image tag number, then validates the move for the piece name moved.
My app also manages an array of records: PieceName, PieceColor, LastSquare. LastSquare is used to undo a move if it fails validation.
I have some avi and mp4 video demos, if interested. I did upload a 3MB 1-minute:23 mp4 that I made just for this post. White opens with The London and black opens with The Englund. "Mate in eight! Black wins. Most of the videos I have are too big to share here.
My website is SamsChessBoard.ddns.net. (I host this in my home office, so you will see a "Not secure" alert in your browser.) any way, if you go to the bottom of the first page of my website, you can click my email link and let me know if you want to see the demos. There are some icky demos on the website too. I will share my algorithms and some code with you also.
BTW, I am 79 years old. I began playing chess shortly after my 75th bday. I am 1299 in classical and about 1700 in correspondence on Lichess.org. I am FirstSonOfLowell there. send me a msg with code 5792 in it then send me a game.
Sam
2025-03-05_01-31-44.mp4