<h1> List of factions in Alpha Centauri, shuffled and trimmed to 7 entries, because default randomizing sucks </h1> <p> Makes sure you get your fair share of alien adversaries! </p> <form action="" method="get"> <p> Player number: <input type="number" name="players" min="1" max="7" value="<%=params[:players] || 2%>" /> <input type="submit" value="reroll" /> </p> </form> <p>Player <strong><%= rand((params[:players] || 2).to_i) %></strong> is hosting </p> <% alllist = "Spartan Federation Gaia's Stepdaughters University of Planet Peacekeeping Forces Human Hive Lord's Believers Morgan Industries Cult of Planet Cybernetic Consciousness Data Angels Free Drones Nautilus Pirates Manifold Usurpers Manifold Caretakers".split("\n") faclist = alllist.shuffle[0..6] while (faclist.include? "Manifold Usurpers") ^ (faclist.include? "Manifold Caretakers") faclist = alllist.shuffle[0..6] end %> <p> <%= faclist.join("<br />").html_safe %> </p>