From 37e17f156e49084bade2d107d1c3fb10510d782e Mon Sep 17 00:00:00 2001 From: Olivia Hanson Date: Wed, 3 Mar 2021 12:48:44 -0500 Subject: [PATCH] Done. --- app/application.rb | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/app/application.rb b/app/application.rb index e19c3284..ee405509 100644 --- a/app/application.rb +++ b/app/application.rb @@ -1,9 +1,22 @@ class Application def call(env) - resp = Rack::Response.new - resp.write "Hello, World" - resp.finish - end + resp = Rack::Response.new + 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