From 2c459221704db36c4b3512e4e66432dc1eadd791 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sun, 12 Nov 2023 01:22:05 +0100 Subject: 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. --- views/rematch.pug | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 views/rematch.pug (limited to 'views') 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 + | + | #{p.name} + | ? + + 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 -- cgit v1.2.3