Author Topic: Formulae help  (Read 948 times)

Asphyxiates

  • Newbie
  • *
  • Posts: 20
    • View Profile
Formulae help
« on: March 05, 2013, 05:05:09 PM »
Hi, Im currently using the formula below to give 1st place 2 more points than 2nd and 2nd 2 more than 3rd down to 4th then the rest lose 1 point at a time. Can someone tell me what I need to change to have it that 1st place gets 4 points more than 2nd and 2d gets 3 points more than 3rd and 4th onwards gets 1 point less each time. Sorry if ive made this sound complicated but I want the top 3 places to be rewarded more for their efforts.
max(1, n - r + 1) + if(n <10, switch(r, 1,3, 2, 2, 3, 1), switch(r, 1, 8, 2, 6, 3, 4, 4, 2))

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Formulae help
« Reply #1 on: March 06, 2013, 10:23:50 AM »
So this formula current says: the first person busted out gets 1 point, and each subsequently busted out player gets one additional point (first to bust gets 1, next to bust gets 2, etc).  If there are less than 10 players, 1st, 2nd, and 3rd place get an additional 3, 2, and 1 point, respectively.  If there are 10 or more players, 1st, 2nd, 3rd, and 4th place get an additional 8, 6, 4, and 2 points, respectively.

Your description says 1st place gets 2 more than 2nd, 2nd gets 2 more than 3rd, and 3rd gets 2 more than 4th.  Clearly you're describing the case where there are 10 or more players, which is this part: switch(r, 1, 8, 2, 6, 3, 4, 4, 2).  To change it so that 1st gets 3 more than 2nd, and 2nd gets 3 more than 3rd, and 3rd gets 3 more than 4th, it should be: switch(r, 1, 12, 2, 9, 3, 6, 4, 3).  You didn't say what 4th should get, but since the formula initially had 4th getting 2 points and each player getting 2 more than the previously busted player, I'll assume 4th should get 3 now that each player will get 3 more than the previously busted player.

Your formula is now:

max(1, n - r + 1) + if(n < 10, switch(r, 1, 3, 2, 2, 3, 1), switch(r, 1, 12, 2, 9, 3, 6, 4, 3))