Answer the question
In order to leave comments, you need to log in
Organization of the standings
Answer the question
In order to leave comments, you need to log in
match table, where there are fields - id, id of players, match position (in level), match level (1/32, 1/16, ...), status (ongoing, is there a winner, ...)
the match ends, level++, position = position / 2.
I have an implementation of such a thing, you can write to habramail - I will gladly share the structure
The leaderboard is essentially a binary tree (and this is the so-called full binary tree), so you need to look for a representation of binary trees in relational databases.
I looked at the profile - you know PHP, which means a good place to start from:
phpclub.ru/faq/Tree?v=w5u
i would number all games and store 3 records: player1 id, player2 id, winner id
15 lines
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question