From fa46db5c02e1875585c77adf32ad268e62e08b05 Mon Sep 17 00:00:00 2001 From: Mitchell Beebe Date: Mon, 4 May 2020 22:46:32 -0400 Subject: [PATCH] Done. --- app/application.rb | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/app/application.rb b/app/application.rb index e19c3284..a9e5903a 100644 --- a/app/application.rb +++ b/app/application.rb @@ -1,9 +1,23 @@ class Application - + def call(env) resp = Rack::Response.new - resp.write "Hello, World" + + num_1 = Kernel.rand(1..20) + num_2 = Kernel.rand(1..20) + num_3 = Kernel.rand(1..20) + + 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 - -end + +end \ No newline at end of file