Author Topic: Is there an easier way to do this?  (Read 1564 times)

CigarDan

  • Newbie
  • *
  • Posts: 14
    • View Profile
Is there an easier way to do this?
« on: January 26, 2012, 11:09:08 AM »
Attached is a copy of my points scale for the league I run. It's a small league in comparison to many but we're just a bunch of friends who all love the game. Recently we decided to break the year up into 3 seasons and hold a championship tourney at the end of each with the winner getting the season title and some distinguishing mark next to their display name in the TD (example CigarDan*1* for season 1 champ). Only the top 9 in points at the end of a season are eligible for the Finals.

Currently I use a different prize template for each number of entrants to award my points, is there a way I can use this point scale with the points for playing formula or am I just better off with the 11+ different prize templates?

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6220
    • View Profile
Re: Is there an easier way to do this?
« Reply #1 on: January 26, 2012, 12:54:57 PM »
Use this as your Points for Playing formula:

if(n <= 7,  switch(r, 1, 18, 2, 11, 3,  6, 4,  3, 5,  2, 6, -3, -6))
+ if(n == 8,  switch(r, 1, 20, 2, 13, 3,  8, 4,  5, 5,  2, 6,  0, 7, -3, -6))
+ if(n == 9,  switch(r, 1, 23, 2, 15, 3,  9, 4,  6, 5,  3, 6,  1, 7,  0, 8, -3, -6))
+ if(n == 10, switch(r, 1, 26, 2, 17, 3, 10, 4,  7, 5,  4, 6,  2, 7,  1, 8,  0, 9, -3, -6))
+ if(n == 11, switch(r, 1, 29, 2, 19, 3, 12, 4,  8, 5,  5, 6,  3, 7,  2, 8,  0, 9,  0, 10, -3, -6))
+ if(n == 12, switch(r, 1, 32, 2, 21, 3, 14, 4,  9, 5,  6, 6,  4, 7,  2, 8,  1, 9,  0, 10,  0, 11, -3, -6))
+ if(n == 13, switch(r, 1, 36, 2, 24, 3, 15, 4, 10, 5,  7, 6,  5, 7,  3, 8,  2, 9,  0, 10,  0, 11, -1, 12, -3, -6))
+ if(n == 14, switch(r, 1, 40, 2, 26, 3, 17, 4, 12, 5,  8, 6,  6, 7,  4, 8,  3, 9,  0, 10,  0, 11,  0, 12, -1, 13, -3, -6))
+ if(n == 15, switch(r, 1, 44, 2, 29, 3, 19, 4, 14, 5, 10, 6,  7, 7,  5, 8,  3, 9,  0, 10,  0, 11,  0, 12, -1, 13, -1, 14, -3, -6))
+ if(n == 16, switch(r, 1, 48, 2, 32, 3, 21, 4, 16, 5, 11, 6,  8, 7,  6, 8,  4, 9,  1, 10,  0, 11,  0, 12, -1, 13, -1, 14, -1, 15, -3, -6))
+ if(n >= 17, switch(r, 1, 51, 2, 35, 3, 23, 4, 18, 5, 13, 6, 10, 7,  7, 8,  5, 9,  2, 10,  0, 11,  0, 12, -1, 13, -1, 14, -1, 15, -2, 16, -3, -6))


Big and ugly, but will work.  Two things to note: The first and last if() statements use <= (less than or equal to) and >= (greater than or equal to), so the formula will still work if you have fewer than 7 players or more than 17.  And the final value in each switch statement does not have a qualifying rank, which means it's an "else" clause, so any ranks not qualified in the switch statement will receive -6 points.  This only matters for the final if() statement.  In other words, if you have 25 players, ranks 17 through 25 will receive -6 points.

CigarDan

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Is there an easier way to do this?
« Reply #2 on: January 26, 2012, 07:06:35 PM »
My league rules state that if there are 6 or fewer players it is a non-point game, so in that case, all I would have to do is remove the "<" from the first line right?

and I can copy/paste this into my game and it will hand out the points instead of using a different prize templates for each number of players like i was doing, you're the best Corey!

Magic_fubu

  • Hero Member
  • *****
  • Posts: 1035
    • View Profile
Re: Is there an easier way to do this?
« Reply #3 on: January 26, 2012, 07:24:51 PM »
Not sure, but if you want it to automate, you could make it be if(n <= 6,  0) + if(n == 7, r, 1, 18, ........
My cowboys shot down your rockets
---
If you send a request to me please send that you got me from here w/your TD name to confirm. Thanks!

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6220
    • View Profile
Re: Is there an easier way to do this?
« Reply #4 on: January 27, 2012, 01:08:44 PM »
Either way will work.  Honestly, this part: if(n <= 6,  0) is fairly pointless (no pun intended) as far as the formula is concerned.  It is basically saying "if there are 6 or fewer players, award 0 points, otherwise award 0 points".  But you might want to leave it in as a sort of explanation for humans who look at the formula.

CigarDan

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Is there an easier way to do this?
« Reply #5 on: January 27, 2012, 06:09:28 PM »
Thanks again, as for others that have questions about the formula, they will be referred to the excel sheet with a polite smile, I understand the formula but not to the extent where I would feel comfortable explaining it twenty time a night for the next six weeks.