Author Topic: Need Help with a formula  (Read 3348 times)

rhawkins

  • Newbie
  • *
  • Posts: 4
    • View Profile
Need Help with a formula
« on: December 30, 2009, 09:19:39 AM »
Hey All!

I have been trying to get a formula setup that our league has been using for years. So here goes.

if you have 16 people in the tourney.  I want to score them like this.

rank   players     points       total points
1st     16     *    10      =    160
2nd                            =    144  16 points less than 1st
3rd                             =    129  16 points less than 2nd
4th                             =    112  16 points less ect...
5th                             =      96  16 points less
6th                             =      80  16 points less
7th                             =      64  16 points less
8th                             =      48 16 points less
9th                             =      32 16 points less
10th                           =      16  16 points less
11th                           =      16   \
12th                           =      16     \
13th                           =      16       \
14th                           =      16       /----when the score get to the total players all other players get points=number of players
15th                           =      16     /
16th                           =      16   /

Any help would be great!

I have the first place working  it's easy!

(n-r+1)+10

Getting it to step down the number of players for each rank is my problem.


Thanks..

Johno

  • Full Member
  • ***
  • Posts: 191
    • View Profile
    • The Poker Leaderbaord
Re: Need Help with a formula
« Reply #1 on: December 30, 2009, 09:39:28 AM »
So its

rank   players     points       total points
1st     16     *    10      =    160
2nd    16     *    9        =    144  16 points less than 1st
3rd     16     *    8        =    128  16 points less than 2nd
4th     16     *    7        =    112  16 points less ect...
5th     16     *    6        =      96  16 points less
6th     16     *    5        =      80  16 points less
7th     16     *    4        =      64  16 points less
8th     16     *    3         =      48 16 points less
9th     16     *    2         =      32 16 points less
10th    16     *    1        =      16  16 points less
11th     etc                   =      16   \
12th                           =      16     \
13th                           =      16       \
14th                           =      16       /----when the score get to the total players all other players get points=number of players
15th                           =      16     /
16th                           =      16   /


working on something now
My League Website - Joomla Component for TD. Now available for Joomla 1.5, 1.7 & 2.5

Johno

  • Full Member
  • ***
  • Posts: 191
    • View Profile
    • The Poker Leaderbaord
Re: Need Help with a formula
« Reply #2 on: December 30, 2009, 09:47:25 AM »

this isnt complete but it's 3am here :) Work in progress, may help someone along.


(switch(r, 1, 10, 2, 9, 3, 8, 4, 7, 5, 6, 6, 5, 7, 4, 8, 3, 9, 2, 10, 1, 11) * n ),n)



My League Website - Joomla Component for TD. Now available for Joomla 1.5, 1.7 & 2.5

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Need Help with a formula
« Reply #3 on: December 30, 2009, 10:02:50 AM »
max(n, (n * 10) - ((r - 1) * n))

Sorry to rain on your parade, johno69.  :)

Johno

  • Full Member
  • ***
  • Posts: 191
    • View Profile
    • The Poker Leaderbaord
Re: Need Help with a formula
« Reply #4 on: December 30, 2009, 10:14:49 AM »
haha, I kenw there was an easier way.. I started with 15 lines and slowly broke it down...

Glad you're here Corey :P
My League Website - Joomla Component for TD. Now available for Joomla 1.5, 1.7 & 2.5

rhawkins

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Need Help with a formula
« Reply #5 on: December 30, 2009, 12:44:08 PM »
Worked Perfect!  Thanks.

rhawkins

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Need Help with a formula
« Reply #6 on: December 30, 2009, 10:08:58 PM »
Dang it!..  That formula works great.  I found out tonight that they only award points to the top 20  can this be done? 

so after 20 then no points are awarded.

Thanks in advanced...

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Need Help with a formula
« Reply #7 on: December 31, 2009, 08:51:18 AM »
if(r <= 20, max(n, (n * 10) - ((r - 1) * n)))

rhawkins

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Need Help with a formula
« Reply #8 on: December 31, 2009, 10:02:36 AM »
you da man!!!!


Thanks.