From 2457495fbe7ba9d654cf25e44b1b1feb5c18d043 Mon Sep 17 00:00:00 2001 From: ortufte Date: Mon, 13 Jan 2020 20:30:10 -0600 Subject: [PATCH] Done. --- app/application.rb | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/app/application.rb b/app/application.rb index e19c3284..c06c88c1 100644 --- a/app/application.rb +++ b/app/application.rb @@ -2,7 +2,21 @@ class Application def call(env) resp = Rack::Response.new - resp.write "Hello, World" + + num_1 = Kernel.rand(1..2) + num_2 = Kernel.rand(1..2) + num_3 = Kernel.rand(1..2) + + resp.write "#{num_1}\n" + resp.write "#{num_2}\n" + resp.write "#{num_3}\n" + + if num_1 == num_2 && num_2 == num_3 + resp.write "You Win" + else + resp.write "You Lose" + end + resp.finish end