Adding pieces on the board

We now have a code that converts the FEN notation to its expanded coordinate-based representation. Now, let's code to actually display chess pieces on the board, based on a given FEN notation, as shown in the following screenshot:

Adding pieces on the board

Prepare for Lift Off

We will use PNG images for displaying pieces on the board. We have provided PNG images for each piece in a folder named pieces_image. The images have been named by appending the shortname of each piece followed by the color of the piece. For instance, black queen is saved as qblack.png, and white knight is saved as nwhite.png.

We have chosen PNG over GIF because unlike GIF, ...

Get Tkinter GUI Application Development HOTSHOT now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.