show top scores on leaderboard
This commit is contained in:
parent
ac25bedfc2
commit
df2ed789f7
2 changed files with 10 additions and 4 deletions
2
index.js
2
index.js
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue