In article <q7e765-hfk.ln1@[EMAIL PROTECTED]
>,
Luc The Perverse <ataylor_no_spa_am@[EMAIL PROTECTED]
> wrote:
>If I always choose the one closest to the bottom then the user won't
>need to identify the word he can just click closest to the bottom and
>get it right. On the other hand, if I always choose at random then
>eventually, no matter how fast the player is, new objects will be
>randomly selected from the top of the screen enough times that the user
>has to fail, which is equally unacceptable.
What you're trying to do is bias the random number generator
towards the bottom. One relatively easy way to do this is make the
random # generator pick from "more" entries. Give the top item one
entry, the one below it two entries, the third item three entries. It
should be easy to calculate how many total "entries" there are. Then,
pick a random #, and find the original entry. That'll tend to give
items near the bottom more votes.
Nathan Mates
--
<*> Nathan Mates - personal webpage http://www.visi.com/~nathan/
# Programmer at Pandemic Studios -- http://www.pandemicstudios.com/
# NOT speaking for Pandemic Studios. "Care not what the neighbors
# think. What are the facts, and to how many decimal places?" -R.A.
Heinlein


|