Skip to content

Instantly share code, notes, and snippets.

@Gahen
Last active May 23, 2024 19:33
Show Gist options
  • Save Gahen/a91241f175d0931b8b41e4eaea592d59 to your computer and use it in GitHub Desktop.
Save Gahen/a91241f175d0931b8b41e4eaea592d59 to your computer and use it in GitHub Desktop.

Score data types

Solve Status

[
    { 
        "challengeName": string,
        "CPVs": [
            { 
                "name": string,
                "scores": [
                    { 
                        "teamId": number,
                        "score": 0 | 1 | 2 
                        // we have 3 states to show
                    },
                    // ... repeats for each team
                ]
            },
            // ... repeats for each cpv
        ]
    },
    // ... repeats for each challenge
]

if the CPVs are just numbers (no name) we could simplify it like this

[
    { 
        "challengeName": string,
        "CPVs": [
            [
                [
                    { 
                        "teamId": number,
                        "score": 0 | 1 | 2
                        // we have 3 states to show
                    },
                    // ... repeats for each team
                ]
            ],
            // ... repeats for each cpv
        ]
    },
    // ... repeats for each challenge
]

Map (circle) chart

[
    { 
        "challengeName": string,
        "status": [
            0 | 1 | 2,
            // ... repeats for each hexagon
        ]
    },
    // ... repeats for each challenge
]

If we want to show some more info on mouse over we should add that here (but instead of a list of numbers it shuold be a list of objects with text and the number inside)

Leaderboard

[
    { 
        "teamName": string, // or teamId: number
        "position": number,
        "movement": "up" | "down"
    },
    // ... repeats for each challenge
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment