From bc245b174cfc4c8ef9ad76114c894020693003d2 Mon Sep 17 00:00:00 2001 From: Daniel Suarez Date: Mon, 26 Apr 2021 22:11:37 -0400 Subject: [PATCH 1/2] Done. --- app/application.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/application.rb b/app/application.rb index e19c3284..4bdb6ae5 100644 --- a/app/application.rb +++ b/app/application.rb @@ -2,7 +2,17 @@ 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) + + if num_1==num_2 && num_2==num_3 + resp.write "You Win" + else + resp.write "You Lose" + end + resp.finish end From ab34ffde4d4eed4c4fc84fab00e993b51b96811b Mon Sep 17 00:00:00 2001 From: Daniel Suarez Date: Mon, 26 Apr 2021 22:27:29 -0400 Subject: [PATCH 2/2] Done. --- app/application.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/application.rb b/app/application.rb index 4bdb6ae5..01054256 100644 --- a/app/application.rb +++ b/app/application.rb @@ -7,6 +7,10 @@ def call(env) 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