summaryrefslogtreecommitdiffstats
path: root/sunrise.py
diff options
context:
space:
mode:
authorgroup1 <f16_group1@pbridge.adm.cs.cmu.edu>2016-10-17 00:06:48 -0400
committergroup1 <f16_group1@pbridge.adm.cs.cmu.edu>2016-10-17 00:06:48 -0400
commit841c7607ffab66d208771c220f2e6a9193112234 (patch)
tree8972cee340515fdd81db0c0e86c6f271dc6f1ade /sunrise.py
parentDolphin attempt 2, it almost looks good (diff)
downloadbridge-841c7607ffab66d208771c220f2e6a9193112234.tar.zst
Sunrise changes
Diffstat (limited to 'sunrise.py')
-rw-r--r--sunrise.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/sunrise.py b/sunrise.py
index 4956342..fc235ed 100644
--- a/sunrise.py
+++ b/sunrise.py
@@ -140,12 +140,10 @@ def compute_coverage(fish, x, y):
def pick_ocean_HSV(sky_brightness):
"""Return a random color in an appropriate interval."""
- min_hue = 236 / 360
- max_hue = 250 / 360
- min_sat = 0.25
- max_sat = 0.6
- hue = random.random() * (max_hue - min_hue) + min_hue
- saturation = random.random() * (max_sat - min_sat) + min_sat
+ min_hue = constants.MIN_HUE
+ min_saturation = constants.MIN_SATURATION
+ hue = random.random() * (constants.MAX_HUE - min_hue) + min_hue
+ saturation = random.random() * (MAX_SATURATION - min_saturation) + min_saturation
return color.HSV(hue, saturation, sky_brightness)
@@ -161,8 +159,8 @@ def transition(start, end, step):
def random_change():
"""Return a random amount that a light should change each frame."""
- min_time = int(2 * FRAME_RATE)
- max_time = int(6 * FRAME_RATE)
+ min_time = int(constants.MIN_TIME * FRAME_RATE)
+ max_time = int(MAX_TIME * FRAME_RATE)
return 1 / random.randint(min_time, max_time)