From 20c9f965c06b862d225d1be1115d46ed4a2bab59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleksander=20Wo=C5=BAniak?= Date: Fri, 1 Feb 2013 11:57:44 +0100 Subject: [PATCH 1/3] test --- ugh.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ugh.rb b/ugh.rb index 4653a83..15f3232 100644 --- a/ugh.rb +++ b/ugh.rb @@ -13,7 +13,7 @@ def initialize(width, height) @taxi = Taxi.new(15, 15) @passengers = [] create_new_passanger - @destinations = [EndPoint.new(10,15), EndPoint.new(20,30), EndPoint.new(20,1)] + @destinations = [EndPoint.new(10,15), EndPoint.new(2,9), EndPoint.new(20,3)] end def exit_message @@ -54,19 +54,19 @@ def sleep_time end def move_left - objects.first.x -= 1 + objects.first.x -= 1 if objects.first.x > 0 end def move_right - objects.first.x += 1 + objects.first.x += 1 if objects.first.x < @width-1 end def move_down - objects.first.y += 1 if objects.first.y < @height + objects.first.y += 1 if objects.first.y < @height-1 end def move_up - objects.first.y -= 1 + objects.first.y -= 1 if objects.first.y > 0 end def any_delivered? @@ -84,7 +84,7 @@ def delivered(passanger) end def fall - move_down if @tick % 30 == 0 + move_down if @tick % 50 == 0 && objects.first.y < @height-1 end def create_new_passanger @@ -161,4 +161,4 @@ def passanger? end -Gaminator::Runner.new(UghGame, :rows => 40, :cols => 100).run +Gaminator::Runner.new(UghGame, :rows => 30, :cols => 50).run From 77923d4648a40b98390336e24a25b83305c1c16e Mon Sep 17 00:00:00 2001 From: kyodai86 Date: Fri, 1 Feb 2013 12:08:35 +0100 Subject: [PATCH 2/3] test --- ugh.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ugh.rb b/ugh.rb index 15f3232..cd73685 100644 --- a/ugh.rb +++ b/ugh.rb @@ -84,7 +84,7 @@ def delivered(passanger) end def fall - move_down if @tick % 50 == 0 && objects.first.y < @height-1 + move_down if @tick % 30 == 0 && objects.first.y < @height-1 end def create_new_passanger From 4f831246e76f40e4fb80e4b168b76bcc0623d140 Mon Sep 17 00:00:00 2001 From: kyodai86 Date: Fri, 1 Feb 2013 12:10:13 +0100 Subject: [PATCH 3/3] test --- ugh.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ugh.rb b/ugh.rb index cd73685..f00bdc7 100644 --- a/ugh.rb +++ b/ugh.rb @@ -84,7 +84,7 @@ def delivered(passanger) end def fall - move_down if @tick % 30 == 0 && objects.first.y < @height-1 + move_down if @tick % 40 == 0 && objects.first.y < @height-1 end def create_new_passanger