Diff: [root] @ e2dab6efd6d | faq | css

tobuild.erb

File created: scripts/tobuild.erb [Diff]

-- /dev/null++ b/scripts/tobuild.erb
@@ -1 +1,12 @@
<h1> How much do I need to hurry to build SP on next turn? </h1>

<form action="" method="get">
<p> Turns left: <input name="turns" value="<%=params[:turns]%>" /> Full cost: <input name="cost" value="<%=params[:cost]%>" /> <input type="submit" value="calculate" /></p>
</form>

<% if params[:turns] %>
<p>
Invest at least <%=(params[:cost].to_f / params[:turns].to_f * (params[:turns].to_f - 1)).ceil %> EC
</p>
<% end %>

By Voker57 on 2015-11-21 17:44:40 +0000