Skip to content

Commit

Permalink
リファクタリング
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu09 committed Dec 3, 2023
1 parent 291f7ac commit efa9607
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions programs/tree.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ def draw
x = 0
while x < width
y = 0
loop_index = 1
index = 0
while y < height
if loop_index.even?
if index.even?
triangle(x, y + $slide, x + $slide / 2, y, x + $slide, y + $slide)
else
triangle(x, y, x + $slide, y, x + $slide / 2, y + $slide)
end
y += $slide
loop_index += 1
index += 1
end
x += $slide
end
Expand Down

0 comments on commit efa9607

Please sign in to comment.