summaryrefslogtreecommitdiff
path: root/views/game_stats.pug
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-09-12 23:56:45 +0200
committerTor Andersson <tor@ccxvii.net>2023-09-13 20:06:36 +0200
commitb1b753e317daa10e03a6a3b210d185539fac176b (patch)
treeb389ae89f689af3a7d0fb77cb89d46271e18bfc5 /views/game_stats.pug
parent6407378d92eb8880e35e8ee33e1801136a1a44a7 (diff)
downloadserver-b1b753e317daa10e03a6a3b210d185539fac176b.tar.gz
Calculate Elo ratings.
Primarily for use with future matchmaking system to provide better games for everyone. Show top 5 players of each game on the game pages.
Diffstat (limited to 'views/game_stats.pug')
-rw-r--r--views/game_stats.pug25
1 files changed, 25 insertions, 0 deletions
diff --git a/views/game_stats.pug b/views/game_stats.pug
new file mode 100644
index 0000000..a60d7cb
--- /dev/null
+++ b/views/game_stats.pug
@@ -0,0 +1,25 @@
+//- vim:ts=4:sw=4:
+doctype html
+html
+ head
+ include head
+ title #{title_name} - Ranking
+ body
+ include header
+ article
+ h1 #{title_name} - Ranking
+
+ table(style="min-width:auto")
+ thead
+ tr
+ th Player
+ th.r Rating
+ th.r Plays
+ th.r Last played
+ tbody
+ each row in ratings
+ tr
+ td= row.name
+ td.r= row.rating
+ td.r= row.count
+ td.r= row.last