From d81c34cc547d74a7e9898d2abe57b4c1e101f122 Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Wed, 14 Dec 2016 08:06:46 -0800 Subject: [PATCH] [2016][ruby][13.1] --- 2016/ruby/day_13.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2016/ruby/day_13.rb b/2016/ruby/day_13.rb index d0d7bee..c41bd27 100644 --- a/2016/ruby/day_13.rb +++ b/2016/ruby/day_13.rb @@ -53,7 +53,7 @@ end if __FILE__ == $0 maze = Maze.new(1358) - p maze.solve([1,1]).walk.find {|pos,_| pos == [31,39] } + p maze.solve([1,1]).walk.take_while {|pos,count| count < 51 }.map(&:first).uniq.size end require 'minitest'