summaryrefslogtreecommitdiffstats
path: root/fish_show.py
diff options
context:
space:
mode:
authorgroup1 <f16_group1@pbridge.adm.cs.cmu.edu>2016-10-09 23:31:23 -0400
committergroup1 <f16_group1@pbridge.adm.cs.cmu.edu>2016-10-09 23:31:23 -0400
commit882a9d5a8799016f98a34cba1deae11b3aad8c66 (patch)
tree7a97d9437fd58586eab7e21e3e900ed8d7d49afd /fish_show.py
parentRealistic small fish movement (diff)
downloadbridge-882a9d5a8799016f98a34cba1deae11b3aad8c66.tar.zst
Choose a random hue when a fish is spawned
Diffstat (limited to 'fish_show.py')
-rw-r--r--fish_show.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/fish_show.py b/fish_show.py
index 7cd8300..e4f24dd 100644
--- a/fish_show.py
+++ b/fish_show.py
@@ -147,7 +147,9 @@ class FishShow(Show):
self.lights = [Light(x, y, self.bridge.get_light(x, y))
for y in xrange(self.bridge.HEIGHT)
for x in xrange(self.bridge.WIDTH)]
- self.fish = Fish(0, 0.5, 23, 1.5, color.black, 1)
+ random_hue = random.random()
+ fish_color = color.HSV(random_hue, 1, 20/100).to_RGB()
+ self.fish = Fish(0, 0.5, 23, 1.5, fish_color, 1)
def update(self):