We will use the Graphics View framework to implement the board visualization. We will not provide too many details about the implementation, since we focus on scripting in this chapter. The basic skills you learned in Chapter 4, Custom 2D Graphics with Graphics View, should be enough for you to implement this game. The full code of this example is provided with the book. However, we will highlight the architecture of the project and briefly describe how it works.
The game engine implementation consists of two classes:
- The Scene class (derived from QGraphicsScene) manages the graphics scene, creates items, and implements the general game logic
- The Entity class (derived from QGraphicsEllipseItem ...