From faecea5c4877f0b9630155f77c1c941628138636 Mon Sep 17 00:00:00 2001 From: "Liz A. Denys" Date: Sat, 11 Jun 2011 17:32:53 -0400 Subject: [PATCH 1/2] added another checkerboards effect to demonstrate mod better --- effects.py | 14 ++++++++++++++ run.py | 1 + 2 files changed, 15 insertions(+) diff --git a/effects.py b/effects.py index fa3d9f9..4f540fe 100644 --- a/effects.py +++ b/effects.py @@ -111,6 +111,20 @@ def Checkerboards(wall): wall.draw() time.sleep(0.5) +def Checkerboards2(wall): + print "Checkerboards2" + wall.clear() + + for i in range(10): + for x in range(wall.width): + for y in range(wall.height): + if (x + y + i) % 3 == 0: + wall.set_pixel(x, y, colors["black"]) + else: + wall.set_pixel(x, y, colors["yellow"]) + wall.draw() + time.sleep(0.5) + def Columns(wall): print "Columns" wall.clear() diff --git a/run.py b/run.py index 1c91eda..ae5ed3e 100644 --- a/run.py +++ b/run.py @@ -37,6 +37,7 @@ effects.DictionaryTest(wall) effects.RainbowTest(wall) effects.Checkerboards(wall) + #effects.Checkerboards(wall) effects.Columns(wall) effects.Rainbow(wall) effects.Twinkle(wall) From adc087a69d443da874509ce03d32d2e6ab5fc02b Mon Sep 17 00:00:00 2001 From: "Liz A. Denys" Date: Sat, 9 Jul 2011 15:17:24 -0400 Subject: [PATCH 2/2] changed red in SolidColorTest to match dictionary --- effects.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/effects.py b/effects.py index 4f540fe..ff43b88 100644 --- a/effects.py +++ b/effects.py @@ -17,7 +17,7 @@ def SolidColorTest(wall): print "SolidColorTest" wall.clear() - hue = 1 + hue = 0 saturation = 1 value = 1