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 a Random Number

In most game situations, the computer plays the opponent or simulates an unpredictable situation. The key to game programming is the idea of random number generation. You can ask the computer to come up with a random number, which you can use to determine how the computer should proceed.

NOTE

IN THE REAL WORLD

Random number generation is not only for games! You can also use this technique any time you want to simulate uncertainty. Business simulations and testing programs (software designed to test other software) are two types of applications that rely heavily on random number generation. Random numbers also play a key role in a class of programs called neural nets which can often provide answers to otherwise unsolvable ...

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