Summary

Although this wasn't the longest chapter it was probably the chapter where we covered the most C++. We looked at the different types of loop we can use, such as for and while loops. We studied arrays for handling large amounts of variables and objects without breaking a sweat. We also learnt about enumerations and switch. Probably the biggest concept in this chapter, was functions that allow us to organize and abstract our game's code. We will be looking more deeply at functions in a few more places as the book continues.

Now that we have a fully working tree, we can finish the game off in the last chapter for this project.

Get Beginning C++ Game Programming 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.