From ed020328391163300257b77de3899cdb09082b95 Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Sun, 10 Dec 2023 19:58:53 -0800 Subject: [PATCH] [2023][ruby][10.x] one more comment --- 2023/ruby/day_10.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/2023/ruby/day_10.rb b/2023/ruby/day_10.rb index ec848d8..09918ca 100644 --- a/2023/ruby/day_10.rb +++ b/2023/ruby/day_10.rb @@ -84,6 +84,7 @@ p y_range.sum {|y| a = loop_.fetch([y, x_a], nil) b = loop_.fetch([y, x_b], nil) + # it's a chunk if it's multiple empty tiles or a pipe that goes east (a.nil? && b.nil?) || (a && TILE_NEIGHBOR_DELTAS.fetch(a).include?([0,1])) }.select {|chunk| # keep empty tiles