Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Computations and Evaluation

Status
Not open for further replies.

Rhyan

Programmer
Jul 4, 2000
33
0
0
US
Hi,

I'm looking for some help with a project i'm working on to automate an online backgammon league for our club Along with the help of a friend I was able to pretty much get it all going except for the automation of assignments into Divisions and the rearranging of players in divisions at leagues end.

I would appreciate the help of anyone who could help me with this. If I could automate these two things it would take a load off of me.

Thanks,
Rhyan
 
what is the purpose of the automation? is it simply a front end to manage the input of results etc from backgammon matched played in the real world?

it looks like you need to add some 'rules' in your php code that will run when assigning into divisions and rearranging players.

what are the 'rules', and what else has been done for this automation project so far?

kind regards Andres Jugnarain
Wireless Editor
 
Hi,

Thanks for the reply.

1st. We have automated sign up in which they submit their player name and a password, email time zone etc. And when people play their matches (online at they can report them at the league site and the form checks to make sure that the person claiming the win enters a password that matches whats in the database for when they signed up, if so, it posts the win, if not, they get an error page.

I have pages that show played matches, standings and Divisions split up in 1,2,3a,3b,4,4a,4b,4c,4d etc. 1 being the division people try to reach each month. Also, the standings and Division scripts each pull info from the posted results table and adds up Wins for each player before showing them in their respective divisions. Each match win is worth 10 pts.

Here are the rules of the league which I cannot figure out how to translate into php code.

at the end of league when all matches have been played

Bottom 4 players in Division 1 will drop to Division 2.

Top 4 players from Division 2 will move up to Division 1.
Bottom 4 players from Division 2 will drop to Division 3.

Top 4 players from Division 3a and 3b will move up to Division 2.
Bottom 4 players from Division 3 will drop to Division 4.

Top 4 players from Division 4 will move up to Division 3.

For players that are not the top 4 or bottom 4 in a division they will remain in that division.

Also at the end of regular league session if there are more than 4 people tied to move up to next higher division a playoff is required to find out which 4 move up.

This probably sounds complicated and thats exactly why with my limited php experience, I am seeking help.

If you want to check out the league site you can view it at
Thanks a lot
Rhyan
 
presumeably your sql query to demote players from one league to another would be something like:

UPDATE myTable SET division = ( division + 1 )
WHERE division = 1
ORDER BY numberofwins ASC
LIMIT 4

(assuming all your players were in one table, this mysql action query would demote the bottom four players from division 1 to division 2, based on number of wins)

hope that helps

Andres Jugnarain
Wireless Editor
 
Division (Assignments Page) People play people in Like Division
1 Match Only
This is where the Match results reside. 10 Pts is just an arbitrary number
and is used to denote a single win. So if someone has 20, means they won
2 matches of the ones they were assigned.

At leagues end, we'd like to have an ideal number of 4 or so players at
the top and bottom of each division with varying pts totals such as
Player 1 8
Player 2 6
Player 3 5
Player 4 5
Player 6 3
Player 7 2
Player 8 1
Player 9 1

So if that were division 2, the top 4 performers move up to Division 1 and
the bottom for move down to Division 3.

But most of the time there is Not even amounts like this. Sometimes it looks
more like this

Player 1 8
Player 2 6
Player 3 5
Player 4 5
Player 6 5
Player 7 2
Player 8 1
Player 9 8

in a case like this we need a playoff to determine which 4 or so move up.
Divisions usually only have 8 or so players in it.

so the script would
need to first determine who has to playoff and create a playoff table and
insert their names and divisions there so people know who needs to play
who.

once time expires for the playoffs, we need the script to be able
to all the movements like the following.

The following is the current form of movement we use at league's end. This
is of course after any playoffs in case people are tied to move up or down
etc

Division Moves:
The Top Player In Division 1 is League Champion

Bottom 4 players in Division 1 will drop to Division 2.

Top 4 players from Division 2 will move up to Division 1.
Bottom 4 players from Division 2 will drop to Division 3.

Top 4 players from Division 3 will move up to Division 2.
Bottom 4 players from Division 3 will drop to Division 4.

Top 4 players from Division 4 will move up to Division 3.

These numbers may change according to total number of league participants
and other circumstances.

Can anyone help with this? I can probably afford to pay around $30 but thats about it. I do this stuff for free and I'm just trying to make it less of a butt whip for me to maintain. lol

Thank You
Rhyan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top