O'Reilly logo

Microsoft®C# Programming for the absolute beginner by Andy Harris

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

Creating the Math Game

You now know everything necessary to put together the simple Math Game from the beginning of this chapter. The game itself is not complex when you know how all the pieces work.

Designing the Game

The first thing to think about is the general design of the game. This might seem like the easiest step, but often it is the most difficult and frequently overlooked. In this case, I was looking for a simple game that would illustrate the concepts of variables and branching behavior. I also wanted to generate random math problems that would be appropriate for children in elementary school. The program should present four problems, one each of addition, subtraction, multiplication, and division. The answers should always be positive ...

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