Time for action – Implementing the game board class

Now we will focus on our data structure. Add a new private member to ChessBoard, a vector of characters that will contain information about pieces on the board:

QVector<char> m_boardData; 

Consider the following table that shows the piece type and the letters used for it:

Piece type White Black

King

K

k

Queen

Q

q

Rook

R

r

Bishop

B

b

Knight ...

Get Game Programming using Qt 5 Beginner's Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.