From c5b9fe77a8a0e1c2e6a051b700c5a5d4b98ff6fb Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Sat, 15 Jan 2022 14:08:29 -0500 Subject: add randomizer --- app/views/pages/index.html.erb | 2 ++ app/views/pages/randomize.html.erb | 10 ++++++++++ 2 files changed, 12 insertions(+) create mode 100644 app/views/pages/index.html.erb create mode 100644 app/views/pages/randomize.html.erb (limited to 'app/views/pages') diff --git a/app/views/pages/index.html.erb b/app/views/pages/index.html.erb new file mode 100644 index 0000000..809ea04 --- /dev/null +++ b/app/views/pages/index.html.erb @@ -0,0 +1,2 @@ +

Knockout

+

To start the tournament, add players and make sure that the pins are up to date. Then hit randomize to automatically pick teams!

diff --git a/app/views/pages/randomize.html.erb b/app/views/pages/randomize.html.erb new file mode 100644 index 0000000..1505ab5 --- /dev/null +++ b/app/views/pages/randomize.html.erb @@ -0,0 +1,10 @@ +

Randomize

+ +<% @groups.each.with_index do |slice, i| %> +

<%= @machines[i].name %> <%= @machines[i].edition %>

+
    + <% slice.each do |player| %> +
  1. <%= link_to player.name, player_path(player) %>
  2. + <% end %> +
+<% end %> -- cgit 1.4.1