From 0e56059753830596d1c589782a5185a4abf6835b Mon Sep 17 00:00:00 2001 From: J Fern Date: Tue, 12 Nov 2019 03:29:30 +0000 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..03489958 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