Skip to content
Snippets Groups Projects
Select Git revision
  • 6c85f0fce7c2eebeb2c0e131a3ad43cb5cece8e5
  • main default
2 results

index.html

Blame
  • leaderboard.txt 1.04 KiB
    Leaderboard: Store the leaderboard in database.
    
    Requirements:
    1. We will just store this in a PG database called '2doku' with one table called 'leaderboard'.
    
    2. The table will be created like so in this fashion (Implemented in Postgres 9.1, but we have Postgres 15). We will only
       worry about local times should we choose to acquire start and end times.
    
    CREATE DATABASE 2doku;
    \c 2doku;
    
    CREATE TABLE leaderboard (
        id         SERIAL PRIMARY KEY,
        username   VARCHAR(20), -- Can be deleted if we are not extracting usernames.
        elo        INT,
        score      INT,
        clues      INT,
        time_taken TIMESTAMP(3)
    );
    
    3. The leaderboard should give one update for every five minutes.
    4. The leaderboard will first be sorted by the number of clues (ascending), by score (descending), and then by time (ascending).
    
    IMPORTANT NOTES:
    - Do not track env.json in git commits (always put it in .gitignore).
    - We will only worry about storing the information on the database. That means we don't need to do anything HTML/CSS wise until we get the backend done.