summaryrefslogtreecommitdiff
path: root/server.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-03-14 20:03:52 +0100
committerTor Andersson <tor@ccxvii.net>2024-03-16 15:13:32 +0100
commitd288108a7d294389a21a3df9d3f7fbcc5697ffac (patch)
tree00ae1a91be46d04f53497d35c5cc1c9cbf0bb487 /server.js
parent0bfc37790c286c4a8a979a6ace15171340d45be5 (diff)
downloadserver-d288108a7d294389a21a3df9d3f7fbcc5697ffac.tar.gz
Add and track score in player/role assignment.
2 points for a win, 1 point for a tie, 0 points for a loss.
Diffstat (limited to 'server.js')
-rw-r--r--server.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/server.js b/server.js
index 7ab5214..e9baf8d 100644
--- a/server.js
+++ b/server.js
@@ -3143,7 +3143,7 @@ const SQL_USER_STATS = SQL(`
titles.title_name,
scenario,
role,
- sum(role=result) as won,
+ sum(score) / 2 as won,
count(*) as total
from
players
@@ -3163,7 +3163,7 @@ const SQL_USER_STATS = SQL(`
titles.title_name,
scenario,
null as role,
- sum(role=result) as won,
+ sum(score) / 2 as won,
count(*) as total
from
players