[2019][ruby][11.x] use sum instead of a block

master
Alpha Chen 5 years ago
parent cb2379477b
commit 10ace7d99a

@ -35,7 +35,7 @@ t = Thread.new {
when :down then [ 0, -1] when :down then [ 0, -1]
when :left then [-1, 0] when :left then [-1, 0]
end end
robot.panel = robot.panel.zip(delta).map {|a,b| a + b } robot.panel = robot.panel.zip(delta).map(&:sum)
end end
} }

Loading…
Cancel
Save