From a25c2abb2de765c07dd4557413a1879e8dbd9f35 Mon Sep 17 00:00:00 2001 From: nobu09 <11857481+nobu09@users.noreply.github.com> Date: Tue, 5 Dec 2023 08:52:28 +0900 Subject: [PATCH] =?UTF-8?q?=E7=9C=9F=E3=82=93=E4=B8=AD=E3=81=A0=E3=81=91?= =?UTF-8?q?=E7=B7=91=E3=81=A7=E6=8F=8F=E7=94=BB=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- programs/tree.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/programs/tree.rb b/programs/tree.rb index abb1415..16b536f 100644 --- a/programs/tree.rb +++ b/programs/tree.rb @@ -11,10 +11,14 @@ def draw noStroke x = 0 + y = 0 + for xIndex in 0..width y = 0 - fill("green") + color = (xIndex == 4) ? "green" : "white" + fill(color) + for yIndex in 0..height if yIndex.even? triangle(x, y + $ySlide, x + $xSlide / 2, y, x + $xSlide, y + $ySlide)