We are looking for a coder to complete a simple job, at a fast rate! The site and back office is completed, so all we need is couple of tables to tally up with the amount of gifts sent. Example is below, please contact me for further details on the job.
We need to save another variable with each position on table 1 so we know if they have received their first gift on table 1 yet or not. When we send a gift to a member on table 1 if it's their first gift being received on table 1 they go back in for a re-entry and if it's their second gift being received on table 1 then they are removed from the table and don't go back in again for another go around - see gifts #6 and # 11 and # 16 below.
Gift # 1
Look up the global table position variable for level 1 which initially should be set to 1 so that the first gift sent gets sent to the member at the head of table 1.
Gift # 1 is sent to the person at the head of table 1
The person receiving the gift leaves that table
The person sending the gift joins table 1 in the next available position which is position #1 as the table is currently empty
As it was the first gift that the person who received the gift had received and it is table 1 where everyone goes around to receive 2 gifts they then rejoin table 1 again in the next available position which is position #2
Increment the gift senders upper table position generation variable from 0 to 1. As it's on 1 generate their free position in the next available position on table 2
The global table position variable for Level 1 is then set to 2 and saved as table 1 has just received a gift so table 2 is the next table due to receive the next gift.
Gift # 2
Look up the global table position variable for level 1 now says 2 so we know that this next gift is being sent to the member at the head of table 2
Gift # 2 is sent to the person at the head of table 2 - the receiving member is then removed from table two
The sending member is given the next available position on table 1
Increment the gift senders upper table position generation variable from 1 to 2. As it's on 2 no free positions are generated on any of the upper 4 tables
The global table position variable for Level 1 is then set to 3 and saved as table 2 has just received a gift so table 3 is the next table due to receive the next gift.
Gift # 3
Look up the global table position variable for level 1 now says 3 so we know that this next gift is being sent to the member at the head of table 3
Gift # 3 is sent to the person at the head of table 3 - the receiving member is then removed from table three
The sending member is given the next available position on table 1
Increment the gift senders upper table position generation variable from 2 to 3. As it's on 3 generate their free position in the next available position on table 3
The global table position variable for Level 1 is then set to 4 and saved as table 3 has just received a gift so table 4 is the next table due to receive the next gift.
Gift # 4
Look up the global table position variable for level 1 now says 4 so we know that this next gift is being sent to the member at the head of table 4
Gift # 4 is sent to the person at the head of table 4 - the receiving member is then removed from table four
The sending member is given the next available position on table 1
Increment the gift senders upper table position generation variable from 3 to 4. As it's on 4 no free positions are generated on any of the upper 4 tables
The global table position variable for Level 1 is then set to 5 and saved as table 4 has just received a gift so table 5 is the next table due to receive the next gift.
Hi.
I am an information systems engineer wirh more than ten years sw development experience.
I understand the requirement and i can implement it in php.
Regards,
Gerardo.