Author Topic: new formula needed  (Read 1417 times)

D71J

  • Newbie
  • *
  • Posts: 30
    • View Profile
new formula needed
« on: February 19, 2011, 04:12:54 AM »
Hi guys,

I would like to change the formula I use for our pokerleague. For the moment I'm using the following code for points:

assign("half", floor(n/2))
if(r <= half, round(38 * pow(1.1, half - r)))

With this formula half the players get points. I would like to change that to all people getting points, starting with
the first one to drop out -> 10points.  Then I want the following to get 10% more points then the previous one.
The people who reach the final table (9 people) should get bonuspoints for getting this far: ex. 9 -> 20p, 8 -> 40p,
7 -> 70p, 6 -> 110p, 5 -> 160p, 4 -> 220p, 3 -> 310p, 2 -> 410p, 1 -> 520p.

Can anyone help me with this?

Magic_fubu

  • Hero Member
  • *****
  • Posts: 1035
    • View Profile
Re: new formula needed
« Reply #1 on: February 19, 2011, 08:26:47 AM »
If "half" does that for the top half, then you should be able to go "round(38 * pow(1.1, r)"

But if not, then I'm not too sure.
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!

D71J

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: new formula needed
« Reply #2 on: February 19, 2011, 08:53:45 AM »
That doesn't seem to be it, Magic. I don't get any points shown with that formula.

D71J

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: new formula needed
« Reply #3 on: February 19, 2011, 09:24:01 AM »
found it: round(10 * pow(1.2, n - r))

Magic_fubu

  • Hero Member
  • *****
  • Posts: 1035
    • View Profile
Re: new formula needed
« Reply #4 on: February 19, 2011, 09:45:58 AM »
Glad to hear you got it figured out :)  sorry i wasn't more help for you.
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!

D71J

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: new formula needed
« Reply #5 on: February 19, 2011, 09:53:14 AM »
I'm not quite there yet, Magic. I think I need a second part of code that will give the players on the final table
their bonuspoints. I have no idea how to do that.

TIMMER

  • Hero Member
  • *****
  • Posts: 555
    • View Profile
Re: new formula needed
« Reply #6 on: February 19, 2011, 11:29:53 AM »
I'm not quite there yet, Magic. I think I need a second part of code that will give the players on the final table
their bonuspoints. I have no idea how to do that.
Have you tried adding this at the end       + finalTable    or something like   +switch(r, 9, 20, 8, 40, 7, 70, 6, 110, 5, 160, 4, 220, 3, 310, 2, 410, 1, 510)

Magic_fubu

  • Hero Member
  • *****
  • Posts: 1035
    • View Profile
Re: new formula needed
« Reply #7 on: February 19, 2011, 11:31:03 AM »
how do you want for final table bonus points distributed? If you know that, then we can get you finished with the formula :)
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!

D71J

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: new formula needed
« Reply #8 on: February 19, 2011, 02:24:25 PM »
I'm not quite there yet, Magic. I think I need a second part of code that will give the players on the final table
their bonuspoints. I have no idea how to do that.
Have you tried adding this at the end       + finalTable    or something like   +switch(r, 9, 20, 8, 40, 7, 70, 6, 110, 5, 160, 4, 220, 3, 310, 2, 410, 1, 510)

The switch-thing works perfectly, TIMMER. Thx very much!