Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Calculation help needed!
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Lacey
Junior Member

USA
122 Posts

Posted - 18 April 2001 :  12:09:29  Show Profile  Visit Lacey's Homepage  Send Lacey an AOL message
Queston of y'all.

I am creating a ranking ladder and I need some calculations to be done at a point in the updating. Here is the scenerio.. please let me know if it makes sense and if it's something someone can code for me..

Entrant1 plays a game with Entrant2 and with Entrant3 They finish their game and go to the REPORT GAME option (which is where this code will need to be placed and used) to report information regarding the game's outcome.. such as:

How many played today? (this will have drop down menu of MAX # allowed to play the game with a MIN number .. example: game allows 2-6 to play.. drop down would have 2,3,4,5,6)

MY Name (person reporting,their name as listed on file)
Placed: (option here for first, 2nd or 3rd.. and will depend on what was chosen in "HOW MANY PLAYED" dropdown)

Opponent1: (dropdown menu with possible players from db of said game)
opponent1 place: (options would be dependant on what was chosen in "HOW MANY PLAYED" field)

and this would continue until ALL opponents were reported.

Now.. here's where the calculations will be needed.

Each entrant already has points currently reported to their player on said game's db.. and for being 1st, 2nd, 3rd etc.. would earn additional points. The earned points would then be added to current points and once added would be updated with new current points.

When a query is done to view TOP 10 etc.. then the current points would be sorted and the TOP 10 would be displayed accordingly.

Example of points to be added:

ENTRANT1 has 1200 points already (2nd place)
ENTRANT2 has 1254 points already (1st place)
ENTRANT3 has 1133 points already (3rd place)

1st place gets 10 points plus .01% of other entrants combined points (before placement pts are added) (in this case 1st place would get 10pts + 23pts= 33pts added to his points making his total now 1287) 2nd place gets 8 points .. this entrant would then get 1200 + 8 = 1208pts 3rd place get 6 points...this entrant would then get 1133 + 6 = 1139pts

and when a query to show TOP 10 is requested against this db, they would be listed in order according to where they place among all other players.

If this is confusing or as clear as mud, ask away and I'll try to water down the mud a little.

OH.. and to make things a little more complicated.. I would like to have this "reporting of game" on HOLD until ALL entrants have reported and verified that all reported. and when all have reported and verified agree with reports.. then db would be updated accordingly.

There will be other "AND THENs" that will happen.. such as
IF ENTRANT#? does not report, then auto notification of such
IF descrepancies among all entrants, then auto notification of such

And.. (I'm on a roll..someone stop me before I hurt myself).... Could a # be assigned to each "game" when the first person reports so that all other entrants can "ADD TO" a "game" that would be listed in a pull down option.
This pulldown option would lists ENTRANTS thus the new reporter could verify all entrants thus reporting to the correct "game".

Because i'm more of a planner than a coder,
I'm in need of a little assistance in writing it.. IF it's not all that difficult..


OK I"m done for now.. Thx for any and ALL help on this!

~L~
"Have a mah-vah-LACEY day~"

stealthc
Starting Member

21 Posts

Posted - 23 April 2001 :  01:54:57  Show Profile
ok here's a better idea.
You take the amount of players who played the game (whatever that is)
Then you assign points as follows:

1ST place=(MAX PLAYERS-PLACE)+
(total points from (PLACE+1) to last placing player)

2nd place=(MAX PLAYERS-PLACE)+
(total points from (PLACE+1) to last placing player)

etc...
UNTIL Last player where he gets no points.
Here's a sample scenario:
5 players.
MAX=5
Comments enclose in {}
ok so we calculate last places points first.
5th place=(5-5)+0=0
4th place=(5-4)+0=1
3rd place=(5-3)+1=3
2nd place=(5-2)+4=7
1st place=(5-1)+11=15
Simplicity itself is the best system.
You see the last place player deserves nothing. If you come in 4th, it'll take you 3 rounds of placing 4th to get 3 points, which is what you would have gotten had you placed 3rd. 3rd place gets you 3 points, which is a little more rewarding than 4th place. You can almost catch up to a player who gets 2nd and 5th if you take 3rd place twice (although that one 2nd place is worth more than any two 3rd places). As you move up things get a little tighter, however, the value of things double. Placing 1st once is more valuable than placing 2nd twice (just by a bit though).
And it is dependant on the number of players.
For example, here are 3 players:
3rd place=(3-3)+0=0
2nd place=(3-2)+0=1
1st place=(3-1)+1=3

Perhaps people aren't getting as many points, as they should be, but this system relies on the amount of players. It is actually a better system with many more players in it.
Or we could do this (give the last place guy 10 points anyways).

5th place=(5-5)+0+10=10
4th place=(5-4)+10=11
3rd place=(5-3)+21=23
2nd place=(5-2)+54=57
1st place=(5-1)+101=105
If you want to narrow the leads, just take percentages of it:
5th place=(5-5)+(0*20%)+10=10
4th place=(5-4)+(10*20%)+10=13
3rd place=(5-3)+(23*20%)+10=17 (16.6 rounded up)
2nd place=(5-2)+(40*20%)+10=21
1st place=(5-1)+(61*20%)+10=26 (26.2 rounded down).
The percentages (and I suppose given points) determine the leads.
Afterwards you can remove the 10 that was added on, and you get this:
1st place=16
2nd place=11
3rd place=7
4th place=3
5th place=0
Just a few ideas for you.



Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.33 seconds. Powered By: Snitz Forums 2000 Version 3.4.07