dylanpiera / CodenameIndigo

A project with unknown intentions. At least for now.
1 stars 1 forks source link

Bracket DB storage #26

Closed dylanpiera closed 6 years ago

dylanpiera commented 6 years ago

The Problem

Just realized, we need to store the brackets in the database in some way, so the website can also call upon it.

Details

@jdsaphir wanna design a table for this?

jdsaphir commented 6 years ago

I will.

jdsaphir commented 6 years ago

What I'm planning: At the beginning of round 1 (or the end of registration), the matches are randomly assigned, and stored in battles

At the beginning of round 2 (or the end of round 1), the winners are randomly matched up against another winner, stored the same way but with 2 as the round. Then the winners are matched up with 3 as the round and so on until there's only one winner.

But of course, if the number of players at the beginning isn't a power of 2... 🤔

image

dylanpiera commented 6 years ago

player1 BIGINT (The first player's ID) player2 BIGINT (The second player's ID)

Wouldn't these be the player's PIDs (aka no need for BIGINT)?

jdsaphir commented 6 years ago

It would. battles