Open coder13 opened 4 years ago
Do you have a list of colors that you think should be available? Looks like these were the colors on the current algdb.net.
Updated the schema here: 73c68b4
The colors are represented by a stringified array of color codes, so like [1,2,3,4,5]
. Another approach is to make the colors its own table and then create a proper link between user, puzzle, and color, but I figured the stringified array would be more efficient and it suits the purpose just fine.
Yet another approach, which would be the most efficient on the backend, would be to store the color schemes as a stringified JSON object in the user table, and there could be validation to ensure the object has been formatted properly, etc.
My proposal to support various puzzles would be that the colorscheme is a user-puzzle-colorscheme table where colorscheme is an array of colors.