I'm trying to find a formula to find the distance (number of table cells) needed between matches for my tournament brackets. I currently have brackets made for 2 per match and 8 per match, but I would like to combine the two bracket codes to have it calculate space need by how many per match. Say have a tournament with 6 people per match, and have a tournament with 8 people per match all driven by one php code.
If you look at round 1&2 you see that round 2 match 1 is halfway between round 1 matches 1&2. This is what I am trying to accomplish for all rounds. Think of it like a tree, the parent node needs to be half way between the two child nodes all the way to the main parent node.
If you can tell me a better way than doing this than in tables it would be much appreciated.