18 Brain-Train: Your final Project

 

This chapter covers

  • Writing a full code for a Memory Game (several evolving versions)
  • Practicing most of the concepts learned in this book.
  • Learning some important and useful tips and tricks

What a journey it has been! You have completed this journey into the world of C++ programming. You have learned so much about the language and its features, as well as important computer science concepts that will serve you well as you continue to explore the world of programming – and it was our pleasure to teach you.

While you may not know everything there is to know about C++ programming yet, you now have a solid foundation to build upon. Remember to keep practicing and experimenting with the language, and don't be afraid to make mistakes. Every mistake is an opportunity to learn and grow as a programmer, and every bug will make you smarter.

The final exercise of this book is designed to bring together many of the major concepts that you have learned throughout the book. This exercise will challenge you to think creatively and apply your knowledge of C++ programming and computer science concepts to solve a problem. Don't be discouraged if the exercise seems challenging at first. Remember that programming is a skill that takes time and practice to develop. Take your time, think carefully, and don't be afraid to make mistakes.

18.1 Final Exercise: Boost your brain (literally)

18.1.1 How the game works

18.1.2 Step 1: Generating a random sequence

18.1.3 Step 2: Add more building blocks

18.1.4 Step 3: let’s define our classes

18.1.5 Enhancing our game

18.1.6 Helper functions for controlling the position of the cursor

18.1.7 Cleaning the screen

18.1.8 Controlling the Console color

18.1.9 Centering text

18.1.10 The Game Class

18.1.11 The main() function

18.1.12 The final version