From 841c7607ffab66d208771c220f2e6a9193112234 Mon Sep 17 00:00:00 2001 From: group1 Date: Mon, 17 Oct 2016 00:06:48 -0400 Subject: Sunrise changes --- sunrise.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'sunrise.py') 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) -- cgit v1.3.1