I would like to have an equation or an algorithm to calculate the % of tournament winnings paid to players.

For instance if there are only 3 players paid out of X players in a tournament:

1st: 50%
2nd: 35%
3rd: 15%

But I don't want to have to store all of these values in an array or database and would like the payouts to be able to go as high as 100 places. It would be nice to be able to call a function like "getPayouts (50)" and it returns an array of all the payout % for 1st through 50th place.

I have somethign like this but as you will see it can get lengthy:

Uh, you'll have to provide the algorithim if you're hoping for a function, unless you want us to derive it from what you've given, which, incidentally, contradicts itself:

> For instance if there are only 3 players paid out of X players in a tournament:
>
> 1st: 50%
> 2nd: 35%
> 3rd: 15%
>
> 3 => array (50, 30, 20),

If I knew the algorithm then obviously I wouldn't be here. There are a few ways to attack this and I am looking for some input from other people to get those creative juices flowin`

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

You have answered a few of my questions in the past (i think, or have commented on them -- recognize your name!!) and you seem to come through yet again. This is EXACTLY what I was looking for -- a step in the right direction. I will tinker with it some more but you have given me a great start!

Richard QuadlingSenior Software DeverloperCommented:

The winnings are NOT weighted to any one person.

You could add weightings so that more of the winnings go to the winner. It is all about determining the number of shares you have to distribute and the number of shares each winner gets.

0

Featured Post

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

> For instance if there are only 3 players paid out of X players in a tournament:

>

> 1st: 50%

> 2nd: 35%

> 3rd: 15%

>

> 3 => array (50, 30, 20),