change scoring and sorting

This commit is contained in:
biglyderv 2024-11-25 14:14:21 -05:00
parent 5414c719f1
commit 155257514d
4 changed files with 16 additions and 6 deletions

View file

@ -62,7 +62,12 @@ app.ws('/', function (ws, req) {
}
);
j = await j.json();
if (game.ws.findIndex(x => x.username == j.username) != -1) {
console.log(`Player ${player.you} uses username ${ws.username} illegally`)
return;
}
ws.username = j.username;
console.log(`Player ${player.you} uses username ${ws.username}`)
})()
return;