|
Posted by Chris H on 04/05/06 12:10
I am wanting to write a function for a poker league manager that will
detrmine players finishing points in a tournament depending on the amount of
players that played... In other words when the tournament director enters
the tournament results into the database, he will enter the number of
players that played and then upon submissin this funtion will takek that
number and if it is in certain ranges will then know which payout structure
to use... for example...
If the total players were 25, then it would determine that for this amount
of players only the top 10 places will get points, and then will use a pre
determined "chart" of percentages and then calculate the players points..
i.e the charts or database would be something like.. and there would have to
be diffrent tables for each players registered range
PLAYER RANGE = 1-10
RANK | PAYOUT PERCENTAGE
========================================
1 | 70%
2 | 20%
3 | 10%
etc etc
Now I have a basic idea of how to get this function to do the majority of
what i need, except I do not know how to make it calculate the points from
percentages and (also all final points have to be rounded up/down)
in other words what is the correct format for this type of equation.
$prize_pool = "5000";
$total_points = 70% of $prize_pool
Also any other suggestions you may have id be glad to hear.
Navigation:
[Reply to this message]
|