renderEnvCell :: SugEnvironmentRenderer
renderEnvCell r@(rw, rh) w _t (coord, cell)
    | sugarRatio <= 0.01 = GLO.blank
    | otherwise          = sugarLevelCircle
  where
    sugarColor = GLO.makeColor 0.9 0.9 0.0 1.0
    
    (x, y) = transformToWindow r w coord

    sugarLevel = sugEnvSugarLevel cell
    sugarRatio = sugarLevel / snd sugarCapacityRange

    sugarRadius = rw * realToFrac sugarRatio
    sugarLevelCircle = GLO.color sugarColor $ GLO.translate x y $ GLO.ThickCircle 0 sugarRadius
renderEnvCell :: SugEnvironmentRenderer
renderEnvCell r@(rw, rh) w _t (coord, cell)
    | sugarRatio <= 0.01 = GLO.blank
    | otherwise          = sugarLevelCircle
  where
    sugarColor = GLO.makeColor 0.9 0.9 0.0 1.0
    
    (x, y) = transformToWindow r w coord

    sugarLevel = sugEnvSugarLevel cell
    sugarRatio = sugarLevel / snd sugarCapacityRange

    sugarRadius = rw * realToFrac sugarRatio
    sugarLevelCircle = GLO.color sugarColor $ GLO.translate x y $ GLO.ThickCircle 0 sugarRadius
renderEnvCell r@(rw, rh) w _t (coord, cell)
    | sugarRatio <= 0.01 = GLO.blank
    | otherwise          = sugarLevelCircle
  where
    sugarColor = GLO.makeColor 0.9 0.9 0.0 1.0
    
    (x, y) = transformToWindow r w coord

    sugarLevel = sugEnvSugarLevel cell
    sugarRatio = sugarLevel / snd sugarCapacityRange

    sugarRadius = rw * realToFrac sugarRatio
    sugarLevelCircle = GLO.color sugarColor $ GLO.translate x y $ GLO.ThickCircle 0 sugarRadius