Diff: [root] @ e2dab6efd6d | faq | css

tobuild.erb

File created: 33188 scripts/tobuild.erb [Diff]

diff --git a/scripts/tobuild.erb b/scripts/tobuild.erb
new file mode 100644
index 0000000..7bc259d
-- /dev/null
++ b/scripts/tobuild.erb
@@ -0,0 +1,11 @@
<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 %>
\ No newline at end of file

By Voker57 on 2015-11-21 19:44:40 +0200 Powered by bitcheese wiki engine