show top scores on leaderboard

This commit is contained in:
biglyderv 2024-11-25 14:14:21 -05:00
parent ac25bedfc2
commit df2ed789f7
2 changed files with 10 additions and 4 deletions

View file

@ -20,7 +20,7 @@ app.use(express.static('./static'));
app.get('/leaderboard', async function (ws, req) {
let scores = game.scores || [];
req.send(scores.map((x,i) => `#${i+1}: ${x[0]} [${x[1]}]`).join('\n'));
req.send(scores.map((x,i) => `#${i+1}: ${x[0]} [${x[1]}: ${x[2]}]`).join('\n'));
})
app.ws('/', function (ws, req) {