summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-11-12 01:22:05 +0100
committerTor Andersson <tor@ccxvii.net>2023-11-30 00:24:06 +0100
commit2c459221704db36c4b3512e4e66432dc1eadd791 (patch)
tree472dd864846e804bda25bd21480cee31f505088b /views
parent5c4cd1485d4303e8fbdd97a5b32273d8367e5eba (diff)
downloadserver-2c459221704db36c4b3512e4e66432dc1eadd791.tar.gz
Allow first player choosing rematch to select player role assignment.
Pick one of swap, keep, or random. In case of mid-air collision, player who chose first gets to decide.
Diffstat (limited to 'views')
-rw-r--r--views/rematch.pug55
1 files changed, 55 insertions, 0 deletions
diff --git a/views/rematch.pug b/views/rematch.pug
new file mode 100644
index 0000000..09df6ec
--- /dev/null
+++ b/views/rematch.pug
@@ -0,0 +1,55 @@
+//- vim:ts=4:sw=4:
+doctype html
+html
+ head
+ include head
+ title= title.title_name
+ body
+ include header
+ article
+ if game.scenario === "Standard"
+ h1 #{title.title_name}
+ else
+ h1 #{title.title_name} - #{game.scenario}
+
+ div.logo
+ +gamecover(title.title_id)
+
+ p Suggest rematch with
+ each p, i in players
+ if i > 0 && players.length > 2
+ | ,
+ if i === players.length - 1
+ |
+ | and
+ |
+ | <a href="#{p.name}">#{p.name}</a>
+ | ?
+
+ form(method="post" action="/rematch/"+game.game_id)
+ p Player roles:
+ if title.is_symmetric
+ br
+ label
+ input(type="radio" name="order" value="keep")
+ | Keep
+ br
+ label
+ input(type="radio" name="order" value="random" checked)
+ | Random
+ else
+ br
+ label
+ input(type="radio" name="order" value="swap" checked)
+ | Swap
+ br
+ label
+ input(type="radio" name="order" value="keep")
+ | Keep
+ br
+ label
+ input(type="radio" name="order" value="random")
+ | Random
+
+ p
+ button(type="submit") Rematch