[2020][ruby][20.x] refactor

pull/2/head
Alpha Chen 4 years ago
parent e1d1092a8b
commit 2c8cff45b0

@ -28,10 +28,7 @@ class Tile
end end
def rotated def rotated
self.class.new( self.class.new(@id, @raw.reverse.transpose)
@id,
@raw.map {|row| [row].transpose }.reverse.inject(&:zip).map(&:flatten),
)
end end
def flipped def flipped

Loading…
Cancel
Save