Play the numbers game from the popular British game show Countdown at web.

You start with a collection of random numbers, divided into small numbers from 1 to 10
and large numbers that are 15, 20, 25, and so on until 100.
Pick any combination of six numbers from both large and small numbers.

The course of the game
1) Generate a random numbers.
o Four small numbers
o Two large numbers
2) Next generate a random target number between 200 and 999.

Then use simple arithmetic operations with your six numbers try to calculate the target number
using each small and large number no more than once.
You get the highest number of points if you calculate the target number exactly
and fewer points if you can get within 10 of the target number.

For example, if your random numbers were 75, 100, 2, 3, 4, and 1, and your target number was 505,
you might say 2 + 3 =5,  5 × 100 = 500,  4 + 1 = 5,  and 5 +500 = 505.
Or more directly: (2 + 3) × 100 + 4 + 1 = 505.

Start with the small numbers to be in the range of 1 to 10
=> Generate the random Small numbers:
Array (  => 1  => 2  => 3  => 4  => 5  => 6  => 7  => 8  => 9  => 10 )
=> Randomize this Small list:
Array (  => 8  => 10  => 5  => 3  => 1  => 2  => 6  => 7  => 4  => 9 )
=> Select four random Small values:  8, 5, 3, 7

Generate the random list of large numbers. Starting at 15, incrementing by five, until reach 100
=> Generate the random list of Large numbers:
Array (  => 15  => 20  => 25  => 30  => 35  => 40  => 45  => 50  => 55  => 60  => 65  => 70  => 75  => 80  => 85  => 90  => 95  => 100 )
=> Randomize this Large list:
Array (  => 35  => 55  => 30  => 95  => 40  => 60  => 75  => 90  => 45  => 70  => 25  => 80  => 85  => 15  => 50  => 20  => 65  => 100 )
=> Select two random Large values:  80, 80

Let's start playing a number game
=> Small numbers are 8, 5, 3, 7
=> Large numbers are 9, 11

The target number is: 657

Powered By  BaseURL: http://datatuki.net/web/  Page rendered in 0.0745 seconds