start by calling
Range := 100;
Random(range);
Each value will be in the range 0..100 Disgard totals > 100
e.g random genarate 60,10,20 and 2 = 92 difference is 8 / 4 = 2 gives
62,12,22 and 4 = 100
As the game progesses reduce the value of range towards 25.
and apply the addition.
e.g
5,2,8,5...
Bobba
I would do a loop (or call the function recursivly) that keeps calling random 4 times to get the 4 values, you can make random work within a range.
Add the 4 results together on each itteration, if the results are greater than 100 disgard them.
If less subatract the total from 100...
Steves unavalible at present but he asked me to post this on his behalf..
Generaly I would agree with Zathras, so the missing Row/Col value thing was a delphi bug intresting.
Heres how to do it with objects.
In fact when I dug this out it does do more than just set the colour as you can see...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.