O'Reilly logo

Game Programming using Qt 5 Beginner's Guide - Second Edition by Lorenz Haas, Witold Wysota, Pavel Strakhov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Have a go hero – Extending the game

There are a couple of ways for you to improve the game implementation. For example, you can detect when a player has won and display a pop-up message. You can also allow an arbitrary number of players. You just need to replace the TEAM_COUNT constant with a new property in the Scene class and define more team colors. You can even create a GUI for users to provide their scripts instead of passing them as command-line arguments.

The scripting environment can also be improved. You can provide more helper functions (for example, a function to calculate the distance between two tiles) to make creating scripts easier. On the other hand, you can modify the rules and reduce the amount of available information so ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required